import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { Asset, DataService, GetProductDetailDocument, GetProductWithVariantsQuery, LanguageCode, ModalService, NotificationService, Permission, ProductDetailFragment, ProductVariantFragment, TypedBaseDetailComponent, UpdateProductOptionInput } from '@vendure/admin-ui/core';
import { Observable } from 'rxjs';
import { ProductDetailService } from '../../providers/product-detail/product-detail.service';
import { CreateProductVariantsConfig } from '../generate-product-variants/generate-product-variants.component';
import * as i0 from "@angular/core";
interface SelectedAssets {
    assets?: Asset[];
    featuredAsset?: Asset;
}
export declare const GET_PRODUCT_DETAIL: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
export declare class ProductDetailComponent extends TypedBaseDetailComponent<typeof GetProductDetailDocument, 'product'> implements OnInit, OnDestroy {
    private productDetailService;
    private formBuilder;
    private modalService;
    private notificationService;
    protected dataService: DataService;
    private changeDetector;
    readonly customFields: import("@vendure/admin-ui/core").CustomFieldConfig[];
    detailForm: import("@angular/forms").FormGroup<{
        enabled: import("@angular/forms").FormControl<boolean | null>;
        name: import("@angular/forms").FormControl<string | null>;
        autoUpdateVariantNames: import("@angular/forms").FormControl<boolean | null>;
        slug: import("@angular/forms").FormControl<string | null>;
        description: import("@angular/forms").FormControl<string | null>;
        facetValueIds: import("@angular/forms").FormControl<string[] | null>;
        customFields: import("@angular/forms").FormGroup<{
            [x: string]: import("@angular/forms").FormControl<false | "" | 0 | Date | null>;
        }>;
    }>;
    assetChanges: SelectedAssets;
    productChannels$: Observable<ProductDetailFragment['channels']>;
    facetValues$: Observable<ProductDetailFragment['facetValues']>;
    createVariantsConfig: CreateProductVariantsConfig;
    readonly updatePermissions: Permission[];
    constructor(productDetailService: ProductDetailService, formBuilder: FormBuilder, modalService: ModalService, notificationService: NotificationService, dataService: DataService, changeDetector: ChangeDetectorRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    isDefaultChannel(channelCode: string): boolean;
    assignToChannel(): void;
    removeFromChannel(channelId: string): void;
    assignVariantToChannel(variant: ProductVariantFragment): import("rxjs").Subscription;
    removeVariantFromChannel({ channelId, variant }: {
        channelId: string;
        variant: ProductVariantFragment;
    }): void;
    assetsChanged(): boolean;
    /**
     * If creating a new product, automatically generate the slug based on the product name.
     */
    updateSlug(nameValue: string): void;
    selectProductFacetValue(): void;
    updateProductOption(input: UpdateProductOptionInput & {
        autoUpdate: boolean;
    }): void;
    removeProductFacetValue(facetValueId: string): void;
    private displayFacetValueModal;
    create(): void;
    save(): void;
    canDeactivate(): boolean;
    /**
     * Sets the values of the form on changes to the product or current language.
     */
    protected setFormValues(product: NonNullable<GetProductWithVariantsQuery['product']>, languageCode: LanguageCode): void;
    /**
     * Given a product and the value of the detailForm, this method creates an updated copy of the product which
     * can then be persisted to the API.
     */
    private getUpdatedProduct;
    /**
     * The server may alter the slug value in order to normalize and ensure uniqueness upon saving.
     */
    private updateSlugAfterSave;
    static ɵfac: i0.ɵɵFactoryDeclaration<ProductDetailComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ProductDetailComponent, "vdr-product-detail2", never, {}, {}, never, never, false, never>;
}
export {};
