import { ChangeDetectionStrategy, Component, inject, Input, ViewEncapsulation } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { KBQ_TITLE_TEXT_REF } from '@koobiq/components/core';
import { KbqDropdownItem } from '@koobiq/components/dropdown';
import { KbqIcon } from '@koobiq/components/icon';
import * as i0 from "@angular/core";
/** @docs-private */
export class KbqAppSwitcherDropdownApp extends KbqDropdownItem {
    constructor() {
        super(...arguments);
        this.sanitizer = inject(DomSanitizer);
    }
    getIcon(icon) {
        return this.sanitizer.bypassSecurityTrustHtml(icon || '');
    }
    /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqAppSwitcherDropdownApp, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: KbqAppSwitcherDropdownApp, isStandalone: true, selector: "[kbq-app-switcher-dropdown-app]", inputs: { app: ["kbq-app-switcher-dropdown-app", "app"] }, host: { properties: { "class.kbq-dropdown-item": "false" }, classAttribute: "kbq-app-switcher-dropdown-app" }, providers: [
            { provide: KBQ_TITLE_TEXT_REF, useExisting: KbqAppSwitcherDropdownApp },
            { provide: KbqDropdownItem, useExisting: KbqAppSwitcherDropdownApp }
        ], exportAs: ["kbqAppSwitcherDropdownApp"], usesInheritance: true, ngImport: i0, template: `
        <i class="kbq kbq-icon" [className]=""></i>
        <span class="kbq-app-switcher-dropdown-app__icon" [innerHtml]="getIcon(app.icon)"></span>

        <div class="kbq-app-switcher-dropdown-app__container">
            <div class="kbq-app-switcher-dropdown-app__name">
                <span>{{ app.name }}</span>

                @if (isNested) {
                    <i
                        kbq-icon="kbq-chevron-right-s_16"
                        class="kbq-app-switcher-dropdown-item-trigger__icon"
                        [color]="componentColors.ContrastFade"
                    ></i>
                }
            </div>
            @if (app.caption) {
                <div class="kbq-app-switcher-dropdown-app__caption">{{ app.caption }}</div>
            }
        </div>
    `, isInline: true, styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-app-switcher-dropdown-app{display:flex;flex-direction:row;width:100%;min-height:50px;border-radius:var(--kbq-size-xs);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;cursor:pointer;padding:var(--kbq-size-xxs) var(--kbq-size-m)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__icon{padding-top:var(--kbq-size-s);padding-right:var(--kbq-size-m)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container{width:100%;align-self:center}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container .kbq-app-switcher-dropdown-app__name{display:flex;flex-direction:row;justify-content:space-between}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container .kbq-app-switcher-dropdown-app__caption{margin-left:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app .kbq-dropdown-item__caption{padding-top:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-item-trigger__icon{margin-top:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-app-switcher-dropdown-app.kbq-dropdown-item_highlighted,.kbq-app-switcher-dropdown-app:hover{background:var(--kbq-states-background-transparent-active)}.kbq-app-switcher-dropdown-app.cdk-keyboard-focused{border-color:var(--kbq-list-states-focused-focus-outline-color)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__caption{color:var(--kbq-dropdown-item-caption-color)}.kbq-app-switcher-dropdown-app{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"], dependencies: [{ kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqAppSwitcherDropdownApp, decorators: [{
            type: Component,
            args: [{ standalone: true, selector: '[kbq-app-switcher-dropdown-app]', exportAs: 'kbqAppSwitcherDropdownApp', template: `
        <i class="kbq kbq-icon" [className]=""></i>
        <span class="kbq-app-switcher-dropdown-app__icon" [innerHtml]="getIcon(app.icon)"></span>

        <div class="kbq-app-switcher-dropdown-app__container">
            <div class="kbq-app-switcher-dropdown-app__name">
                <span>{{ app.name }}</span>

                @if (isNested) {
                    <i
                        kbq-icon="kbq-chevron-right-s_16"
                        class="kbq-app-switcher-dropdown-item-trigger__icon"
                        [color]="componentColors.ContrastFade"
                    ></i>
                }
            </div>
            @if (app.caption) {
                <div class="kbq-app-switcher-dropdown-app__caption">{{ app.caption }}</div>
            }
        </div>
    `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
                        class: 'kbq-app-switcher-dropdown-app',
                        '[class.kbq-dropdown-item]': 'false'
                    }, imports: [KbqIcon], providers: [
                        { provide: KBQ_TITLE_TEXT_REF, useExisting: KbqAppSwitcherDropdownApp },
                        { provide: KbqDropdownItem, useExisting: KbqAppSwitcherDropdownApp }
                    ], styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-app-switcher-dropdown-app{display:flex;flex-direction:row;width:100%;min-height:50px;border-radius:var(--kbq-size-xs);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;cursor:pointer;padding:var(--kbq-size-xxs) var(--kbq-size-m)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__icon{padding-top:var(--kbq-size-s);padding-right:var(--kbq-size-m)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container{width:100%;align-self:center}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container .kbq-app-switcher-dropdown-app__name{display:flex;flex-direction:row;justify-content:space-between}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__container .kbq-app-switcher-dropdown-app__caption{margin-left:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app .kbq-dropdown-item__caption{padding-top:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-item-trigger__icon{margin-top:var(--kbq-size-3xs)}.kbq-app-switcher-dropdown-app{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-app-switcher-dropdown-app.kbq-dropdown-item_highlighted,.kbq-app-switcher-dropdown-app:hover{background:var(--kbq-states-background-transparent-active)}.kbq-app-switcher-dropdown-app.cdk-keyboard-focused{border-color:var(--kbq-list-states-focused-focus-outline-color)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__caption{color:var(--kbq-dropdown-item-caption-color)}.kbq-app-switcher-dropdown-app{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-app-switcher-dropdown-app .kbq-app-switcher-dropdown-app__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"] }]
        }], propDecorators: { app: [{
                type: Input,
                args: ['kbq-app-switcher-dropdown-app']
            }] } });
//# sourceMappingURL=data:application/json;base64, 