import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "./asset/relation-asset-input.component";
import * as i3 from "./product/relation-product-input.component";
import * as i4 from "./product-variant/relation-product-variant-input.component";
import * as i5 from "./customer/relation-customer-input.component";
import * as i6 from "./generic/relation-generic-input.component";
/**
 * @description
 * The default input component for `relation` type custom fields. Allows the selection
 * of a ProductVariant, Product, Customer or Asset. For other entity types, a custom
 * implementation will need to be defined. See {@link registerFormInputComponent}.
 *
 * @docsCategory custom-input-components
 * @docsPage default-inputs
 */
export class RelationFormInputComponent {
    static { this.id = 'relation-form-input'; }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: RelationFormInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: RelationFormInputComponent, selector: "vdr-relation-form-input", inputs: { readonly: "readonly" }, ngImport: i0, template: "<div [ngSwitch]=\"config.entity\">\n    <vdr-relation-asset-input\n        *ngSwitchCase=\"'Asset'\"\n        [parentFormControl]=\"formControl\"\n        [config]=\"config\"\n        [readonly]=\"readonly\"\n    ></vdr-relation-asset-input>\n    <vdr-relation-product-input\n        *ngSwitchCase=\"'Product'\"\n        [parentFormControl]=\"formControl\"\n        [config]=\"config\"\n        [readonly]=\"readonly\"\n    ></vdr-relation-product-input>\n    <vdr-relation-customer-input\n        *ngSwitchCase=\"'Customer'\"\n        [parentFormControl]=\"formControl\"\n        [config]=\"config\"\n        [readonly]=\"readonly\"\n    ></vdr-relation-customer-input>\n    <vdr-relation-product-variant-input\n        *ngSwitchCase=\"'ProductVariant'\"\n        [parentFormControl]=\"formControl\"\n        [config]=\"config\"\n        [readonly]=\"readonly\"\n    ></vdr-relation-product-variant-input>\n    <ng-template ngSwitchDefault>\n        <vdr-relation-generic-input\n            [parentFormControl]=\"formControl\"\n               [config]=\"config\"\n               [readonly]=\"readonly\"\n        ></vdr-relation-generic-input>\n    </ng-template>\n</div>\n", styles: [":host{display:block;background-color:var(--color-component-bg-200);padding:3px;border-radius:var(--border-radius)}\n"], dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2.RelationAssetInputComponent, selector: "vdr-relation-asset-input", inputs: ["readonly", "parentFormControl", "config"] }, { kind: "component", type: i3.RelationProductInputComponent, selector: "vdr-relation-product-input", inputs: ["readonly", "parentFormControl", "config"] }, { kind: "component", type: i4.RelationProductVariantInputComponent, selector: "vdr-relation-product-variant-input", inputs: ["readonly", "parentFormControl", "config"] }, { kind: "component", type: i5.RelationCustomerInputComponent, selector: "vdr-relation-customer-input", inputs: ["readonly", "parentFormControl", "config"] }, { kind: "component", type: i6.RelationGenericInputComponent, selector: "vdr-relation-generic-input", inputs: ["readonly", "parentFormControl", "config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: RelationFormInputComponent, decorators: [{
            type: Component,
            args: [{ selector: 'vdr-relation-form-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngSwitch]=\"config.entity\">\n    <vdr-relation-asset-input\n        *ngSwitchCase=\"'Asset'\"\n        [parentFormControl]=\"formControl\"\n        [config]=\"config\"\n        [readonly]=\"readonly\"\n    ></vdr-relation-asset-input>\n    <vdr-relation-product-input\n        *ngSwitchCase=\"'Product'\"\n        [parentFormControl]=\"formControl\"\n        [config]=\"config\"\n        [readonly]=\"readonly\"\n    ></vdr-relation-product-input>\n    <vdr-relation-customer-input\n        *ngSwitchCase=\"'Customer'\"\n        [parentFormControl]=\"formControl\"\n        [config]=\"config\"\n        [readonly]=\"readonly\"\n    ></vdr-relation-customer-input>\n    <vdr-relation-product-variant-input\n        *ngSwitchCase=\"'ProductVariant'\"\n        [parentFormControl]=\"formControl\"\n        [config]=\"config\"\n        [readonly]=\"readonly\"\n    ></vdr-relation-product-variant-input>\n    <ng-template ngSwitchDefault>\n        <vdr-relation-generic-input\n            [parentFormControl]=\"formControl\"\n               [config]=\"config\"\n               [readonly]=\"readonly\"\n        ></vdr-relation-generic-input>\n    </ng-template>\n</div>\n", styles: [":host{display:block;background-color:var(--color-component-bg-200);padding:3px;border-radius:var(--border-radius)}\n"] }]
        }], propDecorators: { readonly: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVsYXRpb24tZm9ybS1pbnB1dC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9keW5hbWljLWZvcm0taW5wdXRzL3JlbGF0aW9uLWZvcm0taW5wdXQvcmVsYXRpb24tZm9ybS1pbnB1dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9keW5hbWljLWZvcm0taW5wdXRzL3JlbGF0aW9uLWZvcm0taW5wdXQvcmVsYXRpb24tZm9ybS1pbnB1dC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQzs7Ozs7Ozs7QUFPMUU7Ozs7Ozs7O0dBUUc7QUFPSCxNQUFNLE9BQU8sMEJBQTBCO2FBQ25CLE9BQUUsR0FBMkIscUJBQXFCLENBQUM7OEdBRDFELDBCQUEwQjtrR0FBMUIsMEJBQTBCLGlHQ3RCdk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IidQcm9kdWN0J1wiXG4gICAgICAgIFtwYXJlbnRGb3JtQ29udHJvbF09XCJmb3JtQ29udHJvbFwiXG4gICAgICAgIFtjb25maWddPVwiY29uZmlnXCJcbiAgICAgICAgW3JlYWRvbmx5XT1cInJlYWRvbmx5XCJcbiAgICA+PC92ZHItcmVsYXRpb24tcHJvZHVjdC1pbnB1dD5cbiAgICA8dmRyLXJlbGF0aW9uLWN1c3RvbWVyLWlucHV0XG4gICAgICAgICpuZ1N3aXRjaENhc2U9XCInQ3VzdG9tZXInXCJcbiAgICAgICAgW3BhcmVudEZvcm1Db250cm9sXT1cImZvcm1Db250cm9sXCJcbiAgICAgICAgW2NvbmZpZ109XCJjb25maWdcIlxuICAgICAgICBbcmVhZG9ubHldPVwicmVhZG9ubHlcIlxuICAgID48L3Zkci1yZWxhdGlvbi1jdXN0b21lci1pbnB1dD5cbiAgICA8dmRyLXJlbGF0aW9uLXByb2R1Y3QtdmFyaWFudC1pbnB1dFxuICAgICAgICAqbmdTd2l0Y2hDYXNlPVwiJ1Byb2R1Y3RWYXJpYW50J1wiXG4gICAgICAgIFtwYXJlbnRGb3JtQ29udHJvbF09XCJmb3JtQ29udHJvbFwiXG4gICAgICAgIFtjb25maWddPVwiY29uZmlnXCJcbiAgICAgICAgW3JlYWRvbmx5XT1cInJlYWRvbmx5XCJcbiAgICA+PC92ZHItcmVsYXRpb24tcHJvZHVjdC12YXJpYW50LWlucHV0PlxuICAgIDxuZy10ZW1wbGF0ZSBuZ1N3aXRjaERlZmF1bHQ+XG4gICAgICAgIDx2ZHItcmVsYXRpb24tZ2VuZXJpYy1pbnB1dFxuICAgICAgICAgICAgW3BhcmVudEZvcm1Db250cm9sXT1cImZvcm1Db250cm9sXCJcbiAgICAgICAgICAgICAgIFtjb25maWddPVwiY29uZmlnXCJcbiAgICAgICAgICAgICAgIFtyZWFkb25seV09XCJyZWFkb25seVwiXG4gICAgICAgID48L3Zkci1yZWxhdGlvbi1nZW5lcmljLWlucHV0PlxuICAgIDwvbmctdGVtcGxhdGU+XG48L2Rpdj5cbiJdfQ==