/*
 * Copyright (c) 2016-2023 VMware, Inc. All Rights Reserved.
 * This software is released under MIT license.
 * The full license information can be found in LICENSE in the root directory of this project.
 */
import { Component, ContentChild } from '@angular/core';
import { ClrDatagridColumnToggle } from './datagrid-column-toggle';
import { SelectionType } from './enums/selection-type';
import * as i0 from "@angular/core";
import * as i1 from "./providers/selection";
import * as i2 from "./providers/detail.service";
import * as i3 from "./providers/columns.service";
import * as i4 from "../../utils";
import * as i5 from "../../forms/checkbox/checkbox-wrapper";
import * as i6 from "./datagrid-column-toggle";
import * as i7 from "@angular/common";
import * as i8 from "../../forms/checkbox/checkbox";
import * as i9 from "../../forms/common/label";
export class ClrDatagridFooter {
    constructor(selection, detailService, columnsService, commonStrings) {
        this.selection = selection;
        this.detailService = detailService;
        this.columnsService = columnsService;
        this.commonStrings = commonStrings;
        /* reference to the enum so that template can access */
        this.SELECTION_TYPE = SelectionType;
    }
    get hasHideableColumns() {
        return this.columnsService.hasHideableColumns;
    }
}
ClrDatagridFooter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ClrDatagridFooter, deps: [{ token: i1.Selection }, { token: i2.DetailService }, { token: i3.ColumnsService }, { token: i4.ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
ClrDatagridFooter.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ClrDatagridFooter, selector: "clr-dg-footer", host: { properties: { "class.datagrid-footer": "true" } }, queries: [{ propertyName: "toggle", first: true, predicate: ClrDatagridColumnToggle, descendants: true }], ngImport: i0, template: `
    <ng-container *ngIf="selection.selectionType === SELECTION_TYPE.Multi && selection.current.length > 0">
      <div class="clr-form-control-disabled">
        <clr-checkbox-wrapper class="datagrid-footer-select">
          <input clrCheckbox type="checkbox" checked="checked" disabled />
          <label>{{ selection.current.length }}</label>
          <span class="clr-sr-only">{{ commonStrings.keys.selectedRows }}</span>
        </clr-checkbox-wrapper>
      </div>
    </ng-container>
    <ng-container *ngIf="!detailService.isOpen">
      <ng-content select="clr-dg-column-toggle"></ng-content>
      <clr-dg-column-toggle *ngIf="hasHideableColumns && !toggle"></clr-dg-column-toggle>
      <div class="datagrid-footer-description">
        <ng-content></ng-content>
      </div>
    </ng-container>
    <ng-content select="clr-dg-pagination"></ng-content>
  `, isInline: true, components: [{ type: i5.ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { type: i6.ClrDatagridColumnToggle, selector: "clr-dg-column-toggle" }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { type: i9.ClrLabel, selector: "label", inputs: ["for"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ClrDatagridFooter, decorators: [{
            type: Component,
            args: [{
                    selector: 'clr-dg-footer',
                    template: `
    <ng-container *ngIf="selection.selectionType === SELECTION_TYPE.Multi && selection.current.length > 0">
      <div class="clr-form-control-disabled">
        <clr-checkbox-wrapper class="datagrid-footer-select">
          <input clrCheckbox type="checkbox" checked="checked" disabled />
          <label>{{ selection.current.length }}</label>
          <span class="clr-sr-only">{{ commonStrings.keys.selectedRows }}</span>
        </clr-checkbox-wrapper>
      </div>
    </ng-container>
    <ng-container *ngIf="!detailService.isOpen">
      <ng-content select="clr-dg-column-toggle"></ng-content>
      <clr-dg-column-toggle *ngIf="hasHideableColumns && !toggle"></clr-dg-column-toggle>
      <div class="datagrid-footer-description">
        <ng-content></ng-content>
      </div>
    </ng-container>
    <ng-content select="clr-dg-pagination"></ng-content>
  `,
                    host: {
                        '[class.datagrid-footer]': 'true',
                    },
                }]
        }], ctorParameters: function () { return [{ type: i1.Selection }, { type: i2.DetailService }, { type: i3.ColumnsService }, { type: i4.ClrCommonStringsService }]; }, propDecorators: { toggle: [{
                type: ContentChild,
                args: [ClrDatagridColumnToggle]
            }] } });
//# sourceMappingURL=data:application/json;base64, 