/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import * as tslib_1 from "tslib";
import { CommonModule } from '@angular/common';
import { Directive, Component, NgModule, ChangeDetectorRef } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { IgxCheckboxModule } from '../checkbox/checkbox.component';
import { ColumnChooserBase } from './column-chooser-base';
import { ColumnChooserItemBase } from './column-chooser-item-base';
import { IgxInputGroupModule } from '../input-group/input-group.component';
var IgxColumnPinningItemDirective = /** @class */ (function (_super) {
    tslib_1.__extends(IgxColumnPinningItemDirective, _super);
    function IgxColumnPinningItemDirective() {
        return _super.call(this, 'pinned') || this;
    }
    Object.defineProperty(IgxColumnPinningItemDirective.prototype, "pinnable", {
        /**
         * Returns whether a column could be pinned.
         * It's not possible to pin a column if there is not enough space for the unpinned area.
         * ```typescript
         * const columnItem: IgxColumnPinningItemDirective;
         * this.columnItem.pinnable;
         * ```
         */
        get: /**
         * Returns whether a column could be pinned.
         * It's not possible to pin a column if there is not enough space for the unpinned area.
         * ```typescript
         * const columnItem: IgxColumnPinningItemDirective;
         * this.columnItem.pinnable;
         * ```
         * @return {?}
         */
        function () {
            return this.column.pinnable;
        },
        enumerable: true,
        configurable: true
    });
    IgxColumnPinningItemDirective.decorators = [
        { type: Directive, args: [{
                    selector: '[igxColumnPinningItem]'
                },] }
    ];
    /** @nocollapse */
    IgxColumnPinningItemDirective.ctorParameters = function () { return []; };
    return IgxColumnPinningItemDirective;
}(ColumnChooserItemBase));
export { IgxColumnPinningItemDirective };
var IgxColumnPinningComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxColumnPinningComponent, _super);
    function IgxColumnPinningComponent(cdr) {
        var _this = _super.call(this, cdr) || this;
        _this.cdr = cdr;
        return _this;
    }
    /**
     * @hidden
     */
    /**
     * @hidden
     * @param {?} container
     * @param {?} column
     * @return {?}
     */
    IgxColumnPinningComponent.prototype.createColumnItem = /**
     * @hidden
     * @param {?} container
     * @param {?} column
     * @return {?}
     */
    function (container, column) {
        if (column.level !== 0 || column.disablePinning) {
            return null;
        }
        /** @type {?} */
        var item = new IgxColumnPinningItemDirective();
        item.container = container;
        item.column = column;
        return item;
    };
    /**
     * @hidden
     */
    /**
     * @hidden
     * @param {?} event
     * @param {?} columnItem
     * @return {?}
     */
    IgxColumnPinningComponent.prototype.checkboxValueChange = /**
     * @hidden
     * @param {?} event
     * @param {?} columnItem
     * @return {?}
     */
    function (event, columnItem) {
        if (event.checked && !columnItem.pinnable) {
            event.checkbox.checked = false;
            return false;
        }
        columnItem.value = !columnItem.value;
    };
    IgxColumnPinningComponent.decorators = [
        { type: Component, args: [{
                    preserveWhitespaces: false,
                    selector: 'igx-column-pinning',
                    template: "\n<div class=\"igx-column-hiding__header\">\n    <h4 class=\"igx-column-hiding__header-title\" *ngIf=\"title\">{{ title }}</h4>\n\n    <igx-input-group class=\"igx-column-hiding__header-input\" *ngIf=\"!disableFilter\">\n        <input igxInput\n            type=\"text\"\n            [(ngModel)]=\"filterCriteria\"\n            [placeholder]=\"filterColumnsPrompt\"\n            autocomplete=\"off\" />\n    </igx-input-group>\n</div>\n\n<div class=\"igx-column-hiding__columns\"\n    [style.max-height]=\"columnsAreaMaxHeight\">\n    <igx-checkbox igxColumnPinningItem\n        *ngFor=\"let columnItem of columnItems\"\n        class=\"igx-column-hiding__columns-item\"\n        (change)=\"checkboxValueChange($event, columnItem)\"\n        [checked]=\"columnItem.value\">\n        {{ columnItem.name }}\n    </igx-checkbox>\n</div>\n"
                }] }
    ];
    /** @nocollapse */
    IgxColumnPinningComponent.ctorParameters = function () { return [
        { type: ChangeDetectorRef }
    ]; };
    return IgxColumnPinningComponent;
}(ColumnChooserBase));
export { IgxColumnPinningComponent };
if (false) {
    /** @type {?} */
    IgxColumnPinningComponent.prototype.cdr;
}
/**
 * @hidden
 */
var IgxColumnPinningModule = /** @class */ (function () {
    function IgxColumnPinningModule() {
    }
    IgxColumnPinningModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [IgxColumnPinningComponent, IgxColumnPinningItemDirective],
                    exports: [IgxColumnPinningComponent],
                    imports: [
                        IgxCheckboxModule,
                        IgxInputGroupModule,
                        CommonModule,
                        FormsModule
                    ]
                },] }
    ];
    return IgxColumnPinningModule;
}());
export { IgxColumnPinningModule };
//# sourceMappingURL=data:application/json;base64, 