import { Component, Input, Output, EventEmitter } from '@angular/core';
export class SdGridDesktopInlineFilter {
    constructor() {
        this.columns = [];
        this.externalFilter = {};
        this.filter = {};
        this.inlineExternal = {};
        this.inlineColumn = {};
        this.sdChange = new EventEmitter();
        this.displayKey = 'SDCUSTOM';
        this.onUpdateFilter = () => {
            this.sdChange.emit();
        };
    }
}
SdGridDesktopInlineFilter.decorators = [
    { type: Component, args: [{
                selector: 'sd-grid-desktop-inline-filter',
                template: "<ng-container *ngIf=\"filterOption?.multiple !== false\">\r\n  <ng-container *ngIf=\"columns?.length && filterOption?.columnInline === 'outside'\">\r\n    <ng-container *ngFor=\"let item of columns\">\r\n      <ng-container\r\n        *ngIf=\"item.type !== 'children' && item.type !== 'image' && !item?.filter?.disabled && item.priority !== 'low'\">\r\n        <ng-container *ngIf=\"inlineColumn[item.field] || inlineColumn[item.field] === undefined\">\r\n          <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n            <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\" [(model)]=\"filter[item.field]\"\r\n              (keyupEnter)=\"onUpdateFilter()\">\r\n            </sd-input>\r\n            <sd-input-currency [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"filter[item.field]\"\r\n              (keyupEnter)=\"onUpdateFilter()\">\r\n            </sd-input-currency>\r\n            <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\"[{value:'1',display:item.trueValue || 'True' },\r\n          {value:'0',display:item.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n              [(model)]=\"filter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n            </sd-select>\r\n            <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'radio'\" [items]=\"item.values\"\r\n              [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"filter[item.field]\"\r\n              (sdChange)=\"onUpdateFilter()\">\r\n            </sd-select>\r\n            <sd-select *ngIf=\"item.type === 'values' && !item?.editor?.autocomplete\" [label]=\"item.title\"\r\n              [items]=\"item.values\" valueField=\"value\" displayField=\"text\" [(model)]=\"filter[item.field]\"\r\n              (sdChange)=\"onUpdateFilter()\">\r\n            </sd-select>\r\n            <sd-autocomplete *ngIf=\"item.type === 'values' && item?.editor?.autocomplete\" [items]=\"item.values\"\r\n              valueField=\"value\" displayField=\"text\" [(model)]=\"filter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n            </sd-autocomplete>\r\n            <sd-date-time *ngIf=\"item.type === 'date' || item.type === 'datetime' || item.type === 'time'\"\r\n              [label]=\"item.title\" [(model)]=\"filter[item.field]\" type=\"date\" (sdChange)=\"onUpdateFilter()\">\r\n            </sd-date-time>\r\n          </div>\r\n        </ng-container>\r\n      </ng-container>\r\n      <ng-container\r\n        *ngIf=\"item.type === 'children' && item.children?.length && !item?.filter?.disabled && item.priority !== 'low'\">\r\n        <ng-container *ngFor=\"let childColumn of item.children\">\r\n          <ng-container\r\n            *ngIf=\"inlineColumn[childColumn.field] && !childColumn?.filter?.disabled && childColumn.priority !== 'low' && childColumn.type !== 'image'\">\r\n            <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n              <sd-input [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'string'\" type=\"text\"\r\n                [(model)]=\"filter[childColumn.field]\" (keyupEnter)=\"onUpdateFilter()\">\r\n              </sd-input>\r\n              <sd-input-currency [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'number'\"\r\n                [(model)]=\"filter[childColumn.field]\" (keyupEnter)=\"onUpdateFilter()\">\r\n              </sd-input-currency>\r\n              <sd-select [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'bool'\" [items]=\"[{value:'1',display:childColumn.trueValue || 'True' },\r\n            {value:'0',display:childColumn.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n                [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n              </sd-select>\r\n              <sd-select [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'radio'\" [items]=\"childColumn.values\"\r\n                [valueField]=\"childColumn.valueField\" [displayField]=\"childColumn.displayField\"\r\n                [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n              </sd-select>\r\n              <sd-select *ngIf=\"childColumn.type === 'values' && !item?.editor?.autocomplete\"\r\n                [label]=\"childColumn.title\" [items]=\"childColumn.values\" valueField=\"value\" displayField=\"text\"\r\n                [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n              </sd-select>\r\n              <sd-autocomplete *ngIf=\"childColumn.type === 'values' && item?.editor?.autocomplete\"\r\n                [items]=\"childColumn.values\" valueField=\"value\" displayField=\"text\"\r\n                [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n              </sd-autocomplete>\r\n              <sd-date-time\r\n                *ngIf=\"childColumn.type === 'date' || childColumn.type === 'datetime' || childColumn.type === 'time'\"\r\n                [label]=\"childColumn.title\" [(model)]=\"filter[childColumn.field]\" type=\"date\"\r\n                (sdChange)=\"onUpdateFilter()\">\r\n              </sd-date-time>\r\n            </div>\r\n          </ng-container>\r\n        </ng-container>\r\n      </ng-container>\r\n    </ng-container>\r\n  </ng-container>\r\n  <ng-container *ngIf=\"filterOption?.externalFilters?.length\">\r\n    <ng-container *ngFor=\"let item of filterOption.externalFilters\">\r\n      <ng-container\r\n        *ngIf=\"(inlineExternal[item.field] || inlineExternal[item.field] === undefined) && item.priority !== 'low'\">\r\n        <div *ngIf=\"item.type !=='daterange' && item.type !=='numberrange';else elseFilterRange\"\r\n          class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n          <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\"\r\n            [(model)]=\"externalFilter[item.field]\" (keyupEnter)=\"onUpdateFilter()\">\r\n          </sd-input>\r\n          <sd-input-currency [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\"\r\n            (keyupEnter)=\"onUpdateFilter()\">\r\n          </sd-input-currency>\r\n          <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\"[{value:'1',display:item.trueValue || 'True' },\r\n          {value:'0',display:item.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n            [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n          </sd-select>\r\n          <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'radio'\" [items]=\"item.values\"\r\n            [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n            (sdChange)=\"onUpdateFilter()\">\r\n          </sd-select>\r\n          <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'custom'\"\r\n            [(model)]=\"externalFilter[displayKey + item.field]\"\r\n            (sdFocusForceBlur)=\"item?.onClick(externalFilter, item.field, displayKey + item.field)\"\r\n            (sdChange)=\"onUpdateFilter()\">\r\n          </sd-input>\r\n          <ng-container *ngIf=\"item.type === 'values'\">\r\n            <sd-select *ngIf=\"item.selection === 'MULTIPLE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n              [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n              (sdChange)=\"onUpdateFilter()\" multiple=\"true\">\r\n            </sd-select>\r\n            <sd-autocomplete *ngIf=\"item.selection === 'AUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n              [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n              (sdChange)=\"onUpdateFilter()\">\r\n            </sd-autocomplete>\r\n            <sd-select *ngIf=\"item.selection === 'MULTIPLEAUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n              [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n              (sdChange)=\"onUpdateFilter()\" filtered=\"true\" multiple=\"true\">\r\n            </sd-select>\r\n            <sd-select *ngIf=\"!item.selection\" [label]=\"item.title\" [items]=\"item.values\" [valueField]=\"item.valueField\"\r\n              [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n            </sd-select>\r\n          </ng-container>\r\n          <sd-date-time [label]=\"item.title\" *ngIf=\"item.type ==='date'\" [(model)]=\"externalFilter[item.field]\"\r\n            type=\"date\" (sdChange)=\"onUpdateFilter()\">\r\n          </sd-date-time>\r\n          <sd-date-range [label]=\"item.title\" *ngIf=\"item.type ==='daterangefull'\"\r\n            [(from)]=\"externalFilter[item.field].from\" [(to)]=\"externalFilter[item.field].to\" [min]=\"item.minDate\"\r\n            [max]=\"item.maxDate\" (sdChange)=\"onUpdateFilter()\">\r\n          </sd-date-range>\r\n        </div>\r\n        <ng-template #elseFilterRange>\r\n          <ng-container *ngIf=\"item.type ==='daterange' && externalFilter[item.field]\">\r\n            <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n              <sd-date-time [label]=\"item.fromTitle\" [(model)]=\"externalFilter[item.field].from\"\r\n                [type]=\"item.enableTime ? 'datetime' : 'date'\" [minDate]=\"item.minDate\"\r\n                [maxDate]=\"externalFilter[item.field].to || item.maxDate\" (sdChange)=\"onUpdateFilter()\">\r\n              </sd-date-time>\r\n            </div>\r\n            <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n              <sd-date-time [label]=\"item.toTitle\" [(model)]=\"externalFilter[item.field].to\"\r\n                [type]=\"item.enableTime ? 'datetime' : 'date'\"\r\n                [minDate]=\"item.minDate || externalFilter[item.field].from\" [maxDate]=\"item.maxDate\"\r\n                (sdChange)=\"onUpdateFilter()\">\r\n              </sd-date-time>\r\n            </div>\r\n          </ng-container>\r\n          <ng-container *ngIf=\"item.type ==='numberrange' && externalFilter[item.field]\">\r\n            <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n              <sd-input [label]=\"item.fromTitle\" type=\" number\" [(model)]=\"externalFilter[item.field].from\"\r\n                (sdChange)=\"onUpdateFilter()\">\r\n              </sd-input>\r\n            </div>\r\n            <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n              <sd-input [label]=\"item.toTitle\" type=\" number\" [(model)]=\"externalFilter[item.field].to\"\r\n                (sdChange)=\"onUpdateFilter()\">\r\n              </sd-input>\r\n            </div>\r\n          </ng-container>\r\n        </ng-template>\r\n      </ng-container>\r\n    </ng-container>\r\n  </ng-container>\r\n</ng-container>",
                styles: [""]
            },] }
];
SdGridDesktopInlineFilter.ctorParameters = () => [];
SdGridDesktopInlineFilter.propDecorators = {
    columns: [{ type: Input }],
    externalFilter: [{ type: Input }],
    filter: [{ type: Input }],
    filterOption: [{ type: Input }],
    inlineExternal: [{ type: Input }],
    inlineColumn: [{ type: Input }],
    sdChange: [{ type: Output }]
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZC1kZXNrdG9wLWlubGluZS1maWx0ZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IkM6L1VzZXJzL25naGlhdHQxNV9vbmVtb3VudC9Eb2N1bWVudHMvbGliLWNvcmUtdWkvcHJvamVjdHMvc2QtY29yZS9ncmlkLyIsInNvdXJjZXMiOlsic3JjL2xpYi9jb21wb25lbnRzL2dyaWQtZGVza3RvcC1pbmxpbmUtZmlsdGVyL2dyaWQtZGVza3RvcC1pbmxpbmUtZmlsdGVyLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsWUFBWSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBU3ZFLE1BQU0sT0FBTyx5QkFBeUI7SUFjcEM7UUFiUyxZQUFPLEdBQW1CLEVBQUUsQ0FBQztRQUM3QixtQkFBYyxHQUFRLEVBQUUsQ0FBQztRQUN6QixXQUFNLEdBQVEsRUFBRS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