import * as i0 from '@angular/core';
import { EventEmitter, booleanAttribute, Output, Input, HostBinding, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
import * as i1 from '@eui/components/eui-icon';
import { EUI_ICON } from '@eui/components/eui-icon';

class EuiIconButtonExpanderComponent {
    constructor() {
        this.size = 'm';
        this.isExpanded = false;
        this.isDirectionForward = false;
        // TODO handle disabled attr (see button implementation)
        this.euiDisabled = false;
        this.buttonClick = new EventEmitter();
    }
    get cssClasses() {
        return [
            'eui-icon-button-expander',
            this.isDirectionForward ? 'eui-icon-button-expander--direction-forward' : '',
        ].join(' ').trim();
    }
    onClick(event) {
        this.buttonClick.emit(event);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiIconButtonExpanderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: EuiIconButtonExpanderComponent, isStandalone: true, selector: "eui-icon-button-expander", inputs: { fillColor: "fillColor", size: "size", ariaLabel: "ariaLabel", isExpanded: ["isExpanded", "isExpanded", booleanAttribute], isDirectionForward: ["isDirectionForward", "isDirectionForward", booleanAttribute], euiDisabled: ["euiDisabled", "euiDisabled", booleanAttribute] }, outputs: { buttonClick: "buttonClick" }, host: { properties: { "class": "this.cssClasses" } }, ngImport: i0, template: "<button\n    type=\"button\"\n    class=\"eui-icon-button-expander-toggle\"\n    [class.eui-icon-button-expander-toggle--expanded]=\"isExpanded\"\n    [attr.aria-label]=\"isExpanded ? 'expanded' : 'collapsed'\"\n    [attr.aria-expanded]=\"isExpanded\"\n    (click)=\"onClick($event)\">\n    @if (fillColor) {\n        @if (isDirectionForward) {\n            <eui-icon-svg icon=\"chevron-forward:sharp\" fillColor=\"{{fillColor}}\" size=\"{{size}}\"></eui-icon-svg>\n        } @else {\n            <eui-icon-svg icon=\"chevron-down:sharp\" fillColor=\"{{fillColor}}\" size=\"{{size}}\"></eui-icon-svg>\n        }\n\n    } @else {\n        @if (isDirectionForward) {\n            <eui-icon-svg icon=\"chevron-forward:sharp\" size=\"{{size}}\"></eui-icon-svg>\n        } @else {\n            <eui-icon-svg icon=\"chevron-down:sharp\" size=\"{{size}}\"></eui-icon-svg>\n        }\n    }\n</button>\n", styles: [":host.eui-icon-button-expander{display:inline-flex;border-radius:var(--eui-br-max)}:host.eui-icon-button-expander:hover{background-color:var(--eui-c-s-secondary-surface-light-hover)}.eui-icon-button-expander-toggle{background-color:transparent;border:var(--eui-bw-none);border-radius:var(--eui-br-max);cursor:pointer;padding:var(--eui-s-2xs);align-items:center;display:flex;justify-content:center;position:relative;transition:all .2s linear!important}.eui-icon-button-expander-toggle:focus:not([readonly]){outline:2px solid var(--eui-c-focus)!important;outline-offset:-2px!important;transition:none}.eui-icon-button-expander-toggle:focus-visible:not([readonly]){outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important;transition:none}.eui-icon-button-expander-toggle [tabindex=\"0\"]:focus:not([readonly]){outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important;transition:none}.eui-icon-button-expander-toggle--expanded{transform:rotate(180deg)}:host.eui-icon-button-expander--direction-forward .eui-icon-button-expander-toggle--expanded{transform:rotate(90deg)}\n"], dependencies: [{ kind: "component", type: i1.EuiIconSvgComponent, selector: "eui-icon-svg, span[euiIconSvg], i[euiIconSvg]", inputs: ["icon", "fillColor", "set", "size", "style", "iconUrl", "transform", "euiVariant", "aria-label", "ariaHidden", "focusable", "isLoading", "isInputIcon", "euiStart", "euiEnd"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiIconButtonExpanderComponent, decorators: [{
            type: Component,
            args: [{ selector: 'eui-icon-button-expander', changeDetection: ChangeDetectionStrategy.OnPush, imports: [...EUI_ICON], template: "<button\n    type=\"button\"\n    class=\"eui-icon-button-expander-toggle\"\n    [class.eui-icon-button-expander-toggle--expanded]=\"isExpanded\"\n    [attr.aria-label]=\"isExpanded ? 'expanded' : 'collapsed'\"\n    [attr.aria-expanded]=\"isExpanded\"\n    (click)=\"onClick($event)\">\n    @if (fillColor) {\n        @if (isDirectionForward) {\n            <eui-icon-svg icon=\"chevron-forward:sharp\" fillColor=\"{{fillColor}}\" size=\"{{size}}\"></eui-icon-svg>\n        } @else {\n            <eui-icon-svg icon=\"chevron-down:sharp\" fillColor=\"{{fillColor}}\" size=\"{{size}}\"></eui-icon-svg>\n        }\n\n    } @else {\n        @if (isDirectionForward) {\n            <eui-icon-svg icon=\"chevron-forward:sharp\" size=\"{{size}}\"></eui-icon-svg>\n        } @else {\n            <eui-icon-svg icon=\"chevron-down:sharp\" size=\"{{size}}\"></eui-icon-svg>\n        }\n    }\n</button>\n", styles: [":host.eui-icon-button-expander{display:inline-flex;border-radius:var(--eui-br-max)}:host.eui-icon-button-expander:hover{background-color:var(--eui-c-s-secondary-surface-light-hover)}.eui-icon-button-expander-toggle{background-color:transparent;border:var(--eui-bw-none);border-radius:var(--eui-br-max);cursor:pointer;padding:var(--eui-s-2xs);align-items:center;display:flex;justify-content:center;position:relative;transition:all .2s linear!important}.eui-icon-button-expander-toggle:focus:not([readonly]){outline:2px solid var(--eui-c-focus)!important;outline-offset:-2px!important;transition:none}.eui-icon-button-expander-toggle:focus-visible:not([readonly]){outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important;transition:none}.eui-icon-button-expander-toggle [tabindex=\"0\"]:focus:not([readonly]){outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important;transition:none}.eui-icon-button-expander-toggle--expanded{transform:rotate(180deg)}:host.eui-icon-button-expander--direction-forward .eui-icon-button-expander-toggle--expanded{transform:rotate(90deg)}\n"] }]
        }], propDecorators: { cssClasses: [{
                type: HostBinding,
                args: ['class']
            }], fillColor: [{
                type: Input
            }], size: [{
                type: Input
            }], ariaLabel: [{
                type: Input
            }], isExpanded: [{
                type: Input,
                args: [{ transform: booleanAttribute }]
            }], isDirectionForward: [{
                type: Input,
                args: [{ transform: booleanAttribute }]
            }], euiDisabled: [{
                type: Input,
                args: [{ transform: booleanAttribute }]
            }], buttonClick: [{
                type: Output
            }] } });

/**
 * @description
 * This module provides the EuiIconButtonExpanderComponent which is used to create
 * icon buttons with an expander functionality.
 *
 * @deprecated Use {@link EUI_ICON_BUTTON_EXPANDER} instead.
 */
class EuiIconButtonExpanderModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiIconButtonExpanderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: EuiIconButtonExpanderModule, imports: [EuiIconButtonExpanderComponent], exports: [EuiIconButtonExpanderComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiIconButtonExpanderModule, imports: [EuiIconButtonExpanderComponent] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiIconButtonExpanderModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [EuiIconButtonExpanderComponent],
                    exports: [EuiIconButtonExpanderComponent],
                }]
        }] });

const EUI_ICON_BUTTON_EXPANDER = [
    EuiIconButtonExpanderComponent,
];
// export { EuiIconButtonExpanderComponent as EuiIconButtonExpander } from './eui-icon-button-expander.component';

/**
 * Generated bundle index. Do not edit.
 */

export { EUI_ICON_BUTTON_EXPANDER, EuiIconButtonExpanderComponent, EuiIconButtonExpanderModule };
//# sourceMappingURL=eui-components-eui-icon-button-expander.mjs.map
