/*
 * Copyright 2015-2024 Ritense BV, the Netherlands.
 *
 * Licensed under EUPL, Version 1.2 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { Component, EventEmitter, HostBinding, Input, Output } from '@angular/core';
import { CommonModule } from '@angular/common';
import { DropdownModule, InputModule } from 'carbon-components-angular';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ValuePathSelectorComponent } from '../../../value-path-selector';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "carbon-components-angular";
export class ValuePathSelectorDropdownValueComponent {
    constructor() {
        this.documentDefinitionName = '';
        this.prefixes = [];
        this.showDocumentDefinitionSelector = false;
        this.notation = 'dots';
        this.dropdownWidth = 250;
        this.fullWidth = false;
        this.disabled = false;
        this.keyColumnFlex = 1;
        this.dropdownColumnFlex = 1;
        this.valueColumnFlex = 1;
        this.valueChange = new EventEmitter();
    }
    onInputChange(type, inputValue) {
        this.valueChange.emit({ value: this.value, inputValue, type });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ValuePathSelectorDropdownValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ValuePathSelectorDropdownValueComponent, isStandalone: true, selector: "valtimo-value-path-selector-dropdown-value", inputs: { keyColumnTitle: "keyColumnTitle", valueColumnTitle: "valueColumnTitle", dropdownColumnTitle: "dropdownColumnTitle", index: "index", value: "value", dropdownItems$: "dropdownItems$", documentDefinitionName: "documentDefinitionName", prefixes: "prefixes", showDocumentDefinitionSelector: "showDocumentDefinitionSelector", notation: "notation", dropdownWidth: "dropdownWidth", fullWidth: "fullWidth", disabled: "disabled", keyColumnFlex: "keyColumnFlex", dropdownColumnFlex: "dropdownColumnFlex", valueColumnFlex: "valueColumnFlex" }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.--full-width": "this.fullWidth" } }, ngImport: i0, template: "<!--\n  ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n  ~\n  ~ Licensed under EUPL, Version 1.2 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" basis,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<div\n  class=\"v-multi-input__input path-selector\"\n  [ngClass]=\"{'--full-width': fullWidth}\"\n  [style.flex]=\"keyColumnFlex\"\n>\n  <cds-label *ngIf=\"index === 0 && keyColumnTitle\">{{ keyColumnTitle }}</cds-label>\n\n  <valtimo-value-path-selector\n    [documentDefinitionName]=\"documentDefinitionName\"\n    [prefixes]=\"prefixes\"\n    [showDocumentDefinitionSelector]=\"showDocumentDefinitionSelector\"\n    [disabled]=\"disabled\"\n    [defaultValue]=\"value?.key\"\n    [notation]=\"notation\"\n    (valueChangeEvent)=\"onInputChange('key', $event)\"\n  ></valtimo-value-path-selector>\n</div>\n\n<div class=\"v-multi-input__separator\"></div>\n\n<div\n  class=\"v-multi-input__input\"\n  [ngClass]=\"{'--full-width': fullWidth}\"\n  [style.minWidth.px]=\"dropdownWidth\"\n  [style.flex]=\"dropdownColumnFlex\"\n>\n  <cds-label *ngIf=\"index === 0 && dropdownColumnTitle\">{{ dropdownColumnTitle }}</cds-label>\n\n  <cds-dropdown (selected)=\"onInputChange('dropdown', $event.item.id)\" [appendInline]=\"true\">\n    <cds-dropdown-list [items]=\"dropdownItems$ | async\" type=\"multi\"></cds-dropdown-list>\n  </cds-dropdown>\n</div>\n\n<div class=\"v-multi-input__separator\"></div>\n\n<div\n  class=\"v-multi-input__input\"\n  [ngClass]=\"{'--full-width': fullWidth}\"\n  [style.flex]=\"valueColumnFlex\"\n>\n  <cds-label *ngIf=\"index === 0 && valueColumnTitle\">{{ valueColumnTitle }}</cds-label>\n\n  <input\n    cdsText\n    [defaultValue]=\"value.value\"\n    [disabled]=\"disabled\"\n    (input)=\"onInputChange('value', $event.target.value)\"\n  />\n</div>\n", styles: [":host{display:flex;align-items:flex-end}:host.--full-width{width:100%}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i2.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i2.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i2.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i2.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: ValuePathSelectorComponent, selector: "valtimo-value-path-selector", inputs: ["name", "appendInline", "margin", "marginLg", "marginXl", "disabled", "documentDefinitionName", "version", "prefixes", "label", "tooltip", "required", "showDocumentDefinitionSelector", "notation", "defaultValue", "type", "parentItem"], outputs: ["valueChangeEvent", "collectionSelected"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ValuePathSelectorDropdownValueComponent, decorators: [{
            type: Component,
            args: [{ selector: 'valtimo-value-path-selector-dropdown-value', standalone: true, imports: [
                        CommonModule,
                        InputModule,
                        DropdownModule,
                        ValuePathSelectorComponent,
                        FormsModule,
                        ReactiveFormsModule,
                    ], template: "<!--\n  ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n  ~\n  ~ Licensed under EUPL, Version 1.2 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" basis,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<div\n  class=\"v-multi-input__input path-selector\"\n  [ngClass]=\"{'--full-width': fullWidth}\"\n  [style.flex]=\"keyColumnFlex\"\n>\n  <cds-label *ngIf=\"index === 0 && keyColumnTitle\">{{ keyColumnTitle }}</cds-label>\n\n  <valtimo-value-path-selector\n    [documentDefinitionName]=\"documentDefinitionName\"\n    [prefixes]=\"prefixes\"\n    [showDocumentDefinitionSelector]=\"showDocumentDefinitionSelector\"\n    [disabled]=\"disabled\"\n    [defaultValue]=\"value?.key\"\n    [notation]=\"notation\"\n    (valueChangeEvent)=\"onInputChange('key', $event)\"\n  ></valtimo-value-path-selector>\n</div>\n\n<div class=\"v-multi-input__separator\"></div>\n\n<div\n  class=\"v-multi-input__input\"\n  [ngClass]=\"{'--full-width': fullWidth}\"\n  [style.minWidth.px]=\"dropdownWidth\"\n  [style.flex]=\"dropdownColumnFlex\"\n>\n  <cds-label *ngIf=\"index === 0 && dropdownColumnTitle\">{{ dropdownColumnTitle }}</cds-label>\n\n  <cds-dropdown (selected)=\"onInputChange('dropdown', $event.item.id)\" [appendInline]=\"true\">\n    <cds-dropdown-list [items]=\"dropdownItems$ | async\" type=\"multi\"></cds-dropdown-list>\n  </cds-dropdown>\n</div>\n\n<div class=\"v-multi-input__separator\"></div>\n\n<div\n  class=\"v-multi-input__input\"\n  [ngClass]=\"{'--full-width': fullWidth}\"\n  [style.flex]=\"valueColumnFlex\"\n>\n  <cds-label *ngIf=\"index === 0 && valueColumnTitle\">{{ valueColumnTitle }}</cds-label>\n\n  <input\n    cdsText\n    [defaultValue]=\"value.value\"\n    [disabled]=\"disabled\"\n    (input)=\"onInputChange('value', $event.target.value)\"\n  />\n</div>\n", styles: [":host{display:flex;align-items:flex-end}:host.--full-width{width:100%}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
        }], propDecorators: { keyColumnTitle: [{
                type: Input
            }], valueColumnTitle: [{
                type: Input
            }], dropdownColumnTitle: [{
                type: Input
            }], index: [{
                type: Input
            }], value: [{
                type: Input
            }], dropdownItems$: [{
                type: Input
            }], documentDefinitionName: [{
                type: Input
            }], prefixes: [{
                type: Input
            }], showDocumentDefinitionSelector: [{
                type: Input
            }], notation: [{
                type: Input
            }], dropdownWidth: [{
                type: Input
            }], fullWidth: [{
                type: Input
            }, {
                type: HostBinding,
                args: ['class.--full-width']
            }], disabled: [{
                type: Input
            }], keyColumnFlex: [{
                type: Input
            }], dropdownColumnFlex: [{
                type: Input
            }], valueColumnFlex: [{
                type: Input
            }], valueChange: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 