import * as i0 from '@angular/core';
import { signal, output, input, computed, ViewEncapsulation, Component } from '@angular/core';
import { EuiChipComponent } from '@eui/components/eui-chip';

class EuiSncComponent {
    constructor() {
        /**
         * Signal to control the visibility of the content section.
         */
        this.showContent = signal(false);
        /**
         * Output event emitter that emits the current visibility state of the content section.
         */
        this.sncToggle = output();
        /**
         * Input to set the length of the dots indicator.
         */
        this.dotsLength = input(8, { transform: (value) => Math.max(0, value) });
        /**
         * Computed property to determine the hidden text based on the dots length.
         */
        this.hiddenText = computed(() => {
            const hiddenCount = this.dotsLength();
            return hiddenCount > 0 ? '•'.repeat(hiddenCount) : '';
        });
    }
    toggleContent() {
        this.showContent.update(value => !value);
        this.sncToggle.emit(this.showContent());
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiSncComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: EuiSncComponent, isStandalone: true, selector: "eui-snc", inputs: { dotsLength: { classPropertyName: "dotsLength", publicName: "dotsLength", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sncToggle: "sncToggle" }, ngImport: i0, template: "<div class=\"eui-snc\">\n    @if (showContent()) {\n        <div class=\"eui-snc__content\">\n            <ng-content />\n        </div>\n    }\n    @if (!showContent()) {\n        <div class=\"eui-snc__hidden\">\n            {{ hiddenText() }}\n        </div>\n    }\n    <eui-chip\n        (click)=\"toggleContent()\"\n        [attr.aria-pressed]=\"showContent()\"\n        aria-label=\"Toggle SNC content\"\n        class=\"eui-snc__badge-toggle\"\n        euiWarning>\n        SNC\n    </eui-chip>\n</div>\n", styles: [".eui-snc{display:flex;flex-direction:row;align-items:center}.eui-snc__badge-toggle{margin-left:var(--eui-s-s);cursor:pointer}.eui-snc__hidden{font-size:var(--eui-s-6xl);line-height:0;letter-spacing:-.04em}\n"], dependencies: [{ kind: "component", type: EuiChipComponent, selector: "eui-chip, span[euiChip], li[euiChip]", inputs: ["ariaLabel", "e2eAttr", "euiInternalId", "tooltipMessage", "id", "data", "isChipRemovable", "isSquared", "isFilled"], outputs: ["remove"] }], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiSncComponent, decorators: [{
            type: Component,
            args: [{ selector: 'eui-snc', encapsulation: ViewEncapsulation.None, standalone: true, imports: [
                        EuiChipComponent,
                    ], template: "<div class=\"eui-snc\">\n    @if (showContent()) {\n        <div class=\"eui-snc__content\">\n            <ng-content />\n        </div>\n    }\n    @if (!showContent()) {\n        <div class=\"eui-snc__hidden\">\n            {{ hiddenText() }}\n        </div>\n    }\n    <eui-chip\n        (click)=\"toggleContent()\"\n        [attr.aria-pressed]=\"showContent()\"\n        aria-label=\"Toggle SNC content\"\n        class=\"eui-snc__badge-toggle\"\n        euiWarning>\n        SNC\n    </eui-chip>\n</div>\n", styles: [".eui-snc{display:flex;flex-direction:row;align-items:center}.eui-snc__badge-toggle{margin-left:var(--eui-s-s);cursor:pointer}.eui-snc__hidden{font-size:var(--eui-s-6xl);line-height:0;letter-spacing:-.04em}\n"] }]
        }] });

const EUI_SNC = [EuiSncComponent];

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

export { EUI_SNC, EuiSncComponent };
//# sourceMappingURL=eui-components-eui-snc.mjs.map
