import { EventEmitter, OnInit } from '@angular/core'; import { BaseModelInterface } from '../../models/base/base-model.model'; import { HelperServiceInterface } from '../../services/helper/helper-service.interface'; import { BaseCreateEditComponentInterface } from './base-create-edit-component.interface'; import * as i0 from "@angular/core"; /** * This abscract class extend your create/edit component some basic functionality, like `load()`, `save()`, * `saveAsNew()` and `stepBack()`. * * In this abstract class we some inputs what you can use or simply overwrite in your component to a static * variable. This inputs are: * * @param isModal `boolean`, default `false` - define this component show as a modal dialog or an a child * component. Affect is on all functions. If this is true, then `load()` isn't load datas, but wait a `model` * input and `save()` isn't send HTTP requests. * * @param saveToStorage `boolean`, default `true` - set the `save()` method must send to the storage to * save model or just simply emit on `saveModel` output. * * @param model `T`, defaut an empty `T` model - set an instance of `T` model. * * @param data `{}`, default null - you can set any properties of the component with `data`. * * @output `saveModel` `EventEmitter` * * @see HelperService */ export declare abstract class BaseCreateEditComponent> implements OnInit, BaseCreateEditComponentInterface { private type; isModal: boolean; saveToStorage: boolean; model: T; set data(value: any); saveModel: EventEmitter; helperService: HelperServiceInterface; constructor(type: new () => T); ngOnInit(): void; /** * Load one instance of model with a given `id`. */ load(): void; /** * Save the current model. */ save(): void; /** * Save model as a new instance. */ saveAsNew(): void; /** * If this is a modal dialog emits `null` in `saveModel` output. Otherwise navigate to the * `{model.api_endpoint}/list` URL. */ stepBack(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "ng-component", never, { "isModal": "isModal"; "saveToStorage": "saveToStorage"; "model": "model"; "data": "data"; }, { "saveModel": "saveModel"; }, never, never, false, never>; } //# sourceMappingURL=base-create-edit.component.d.ts.map