import { Component, EventEmitter, HostBinding, Input, Output } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { FormLabelDirective, FormSelectDirective } from '../../form';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
export class SmartTableItemsPerPageSelectorComponent {
    constructor() {
        this.#itemsPerPage = 5;
        this.itemsPerPageLabel = 'Items per page:';
        this.itemsPerPageOptions = [5, 10, 20, 50];
        this.itemsPerPageChange = new EventEmitter();
    }
    set itemsPerPage(value) {
        if (this.#itemsPerPage != value) {
            this.#itemsPerPage = value;
            this.itemsPerPageChange.emit(value);
        }
    }
    get itemsPerPage() {
        return this.#itemsPerPage;
    }
    #itemsPerPage;
    get hostClasses() {
        return {
            row: true
        };
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SmartTableItemsPerPageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.2", type: SmartTableItemsPerPageSelectorComponent, isStandalone: true, selector: "c-smart-table-items-per-page-selector", inputs: { itemsPerPage: "itemsPerPage", itemsPerPageLabel: "itemsPerPageLabel", itemsPerPageOptions: "itemsPerPageOptions" }, outputs: { itemsPerPageChange: "itemsPerPageChange" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<label cLabel=\"col\" class=\"col-sm-auto\">{{ itemsPerPageLabel }}</label>\n<div class=\"col-auto\">\n  <select [(ngModel)]=\"itemsPerPage\" cSelect name=\"itemsPerPageSelector\">\n    @for (option of itemsPerPageOptions; track option; let i = $index) {\n      <option [ngValue]=\"option\">{{ option }}</option>\n    }\n  </select>\n</div>\n", dependencies: [{ kind: "directive", type: FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }, { kind: "directive", type: FormLabelDirective, selector: "[cLabel]", inputs: ["cLabel", "sizing"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SmartTableItemsPerPageSelectorComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c-smart-table-items-per-page-selector', imports: [
                        FormSelectDirective,
                        FormLabelDirective,
                        FormsModule
                    ], standalone: true, template: "<label cLabel=\"col\" class=\"col-sm-auto\">{{ itemsPerPageLabel }}</label>\n<div class=\"col-auto\">\n  <select [(ngModel)]=\"itemsPerPage\" cSelect name=\"itemsPerPageSelector\">\n    @for (option of itemsPerPageOptions; track option; let i = $index) {\n      <option [ngValue]=\"option\">{{ option }}</option>\n    }\n  </select>\n</div>\n" }]
        }], ctorParameters: () => [], propDecorators: { itemsPerPage: [{
                type: Input
            }], itemsPerPageLabel: [{
                type: Input
            }], itemsPerPageOptions: [{
                type: Input
            }], itemsPerPageChange: [{
                type: Output
            }], hostClasses: [{
                type: HostBinding,
                args: ['class']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnQtdGFibGUtaXRlbXMtcGVyLXBhZ2Utc2VsZWN0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29yZXVpLWFuZ3VsYXIvc3JjL2xpYi9zbWFydC10YWJsZS9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