import { booleanAttribute, ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
import * as i0 from "@angular/core";
let uniqueOptgroupIdCounter = 0;
/**
 * Component that is used to group instances of `kbq-option`.
 * When options aren't provided as `ng-content`, used as a Group Header with styling.
 */
export class KbqOptgroup {
    constructor() {
        this._disabled = false;
        /** Unique id for the underlying label. */
        this.labelId = `kbq-optgroup-label-${uniqueOptgroupIdCounter++}`;
    }
    get disabled() {
        return this._disabled;
    }
    set disabled(value) {
        if (value !== this.disabled) {
            this._disabled = value;
        }
    }
    /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqOptgroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.14", type: KbqOptgroup, selector: "kbq-optgroup", inputs: { label: "label", disabled: ["disabled", "disabled", booleanAttribute] }, host: { properties: { "class.kbq-disabled": "disabled" }, classAttribute: "kbq-optgroup" }, exportAs: ["kbqOptgroup"], ngImport: i0, template: "<label class=\"kbq-optgroup-label\" [id]=\"labelId\">\n    {{ label }}\n</label>\n<ng-content select=\"kbq-option, kbq-list-option, kbq-timezone-option, ng-container\" />\n", styles: [".kbq-optgroup-label{display:flex;align-items:center;box-sizing:border-box;padding:var(--kbq-size-s) var(--kbq-size-l) var(--kbq-size-s) var(--kbq-size-m);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.kbq-optgroup-label{--kbq-optgroup-label-color: var(--kbq-foreground-contrast-secondary);color:var(--kbq-optgroup-label-color)}.kbq-disabled .kbq-optgroup-label{--kbq-optgroup-label-color: var(--kbq-states-foreground-disabled)}.kbq-optgroup-label{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqOptgroup, decorators: [{
            type: Component,
            args: [{ selector: 'kbq-optgroup', exportAs: 'kbqOptgroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
                        class: 'kbq-optgroup',
                        '[class.kbq-disabled]': 'disabled'
                    }, template: "<label class=\"kbq-optgroup-label\" [id]=\"labelId\">\n    {{ label }}\n</label>\n<ng-content select=\"kbq-option, kbq-list-option, kbq-timezone-option, ng-container\" />\n", styles: [".kbq-optgroup-label{display:flex;align-items:center;box-sizing:border-box;padding:var(--kbq-size-s) var(--kbq-size-l) var(--kbq-size-s) var(--kbq-size-m);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.kbq-optgroup-label{--kbq-optgroup-label-color: var(--kbq-foreground-contrast-secondary);color:var(--kbq-optgroup-label-color)}.kbq-disabled .kbq-optgroup-label{--kbq-optgroup-label-color: var(--kbq-states-foreground-disabled)}.kbq-optgroup-label{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}\n"] }]
        }], propDecorators: { label: [{
                type: Input
            }], disabled: [{
                type: Input,
                args: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