import { FormGroup } from '@angular/forms'; import { RoutingService } from '@spartacus/core'; import { OrganizationItemStatus } from '@spartacus/organization/administration/core'; import { Observable } from 'rxjs'; import { CurrentItemService } from './current-item.service'; import { FormService } from './form/form.service'; import * as i0 from "@angular/core"; /** * Provides CRUD operations for all organization entities. * * This base class simplifies the various entity implementation, and ensures a consistent * component implementation. */ export declare abstract class ItemService { protected currentItemService: CurrentItemService; protected routingService: RoutingService; protected formService: FormService; constructor(currentItemService: CurrentItemService, routingService: RoutingService, formService: FormService); key$: Observable; current$: Observable; isInEditMode$: Observable; /** * Returns the current business unit code. * * The current unit is driven by the route parameter. */ unit$: Observable; error$: Observable; save(form: FormGroup, key?: string): Observable>; /** * Deletes an item. */ delete?(key: string, additionalParam?: string): Observable>; /** * Loads an item. */ abstract load(...params: any[]): Observable; /** * Creates a new item. */ protected abstract create(value: T): Observable>; /** * Updates an existing item. */ abstract update(key: string, value: T): Observable>; /** * Returns the detailed cxRoute for the organization item. */ protected abstract getDetailsRoute(): string; getForm(item?: T): FormGroup; /** * Launches the detailed route for the given item item. */ launchDetails(item: T): void; /** * Returns the route parameters that are used when launching the * details page. The route parameters default to the actual item, * but can be further populated in implementations. * * Customized route parameters are useful in case the actual item * doesn't match the expected route parameters. You can manipulate * the parameter data. */ protected buildRouteParams(item: T): any; getRouterParam(key: string): Observable; /** * Sets to true when the user is on the entity item form page */ setEditMode(isInEdit: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; }