import * as i0 from '@angular/core';
import { EventEmitter, inject, ElementRef, ViewChild, Output, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
import * as i3 from '@angular/forms';
import { FormsModule } from '@angular/forms';
import * as i2 from '@fundamental-ngx/cdk/forms';
import { CvaDirective, CvaControl, FD_FORM_FIELD_CONTROL } from '@fundamental-ngx/cdk/forms';
import * as i1 from '@fundamental-ngx/core/content-density';
import { contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';
import { registerFormItemControl } from '@fundamental-ngx/core/form';
import { IconComponent } from '@fundamental-ngx/core/icon';
import { FdTranslatePipe } from '@fundamental-ngx/i18n';
import { Subscription } from 'rxjs';

let switchUniqueId = 0;
/**
 * The Switch component is used to activate or deactivate an element.
 * It uses a visual metaphor to inform the user of the state of the switch.
 */
class SwitchComponent {
    /** Whether the switch is checked. */
    set checked(value) {
        this._cva.value = value;
    }
    get checked() {
        return this._cva.value;
    }
    /** @hidden */
    constructor(_contentDensityObserver) {
        this._contentDensityObserver = _contentDensityObserver;
        /** Optional text for the active state of the switch. */
        this.activeText = '';
        /** Optional text for the inactive state of the switch. */
        this.inactiveText = '';
        /** Id for the switch component. If omitted, a unique one is generated. */
        this.id = `fd-switch-${switchUniqueId++}`;
        /** If it is mandatory field */
        this.required = false;
        /** Whether the switch is semantic */
        this.semantic = false;
        /**
         * Event fired when the state of the switch changes.
         * *$event* can be used to retrieve the new state of the switch.
         */
        this.checkedChange = new EventEmitter();
        /** @hidden */
        this._cva = inject(CvaDirective);
        /** @hidden */
        this._subscriptions = new Subscription();
        /** @hidden */
        this._cvaControl = inject(CvaControl);
        // Set initial value.
        this._cva.value = false;
    }
    /** @hidden */
    ngOnInit() {
        this._cvaControl.listenToChanges();
    }
    /** @hidden */
    ngOnDestroy() {
        this._subscriptions.unsubscribe();
    }
    /** Set focus on the input element. */
    focus() {
        this.inputElement.nativeElement.focus();
    }
    /** Get the id of the inner input element of the switch. */
    get innerInputId() {
        return `${this.id}-input`;
    }
    /** Get the id of the semantic label element of the switch. */
    get _semanticLabelId() {
        return `${this.id}-semantic-label`;
    }
    /** Checked property of the switch. */
    set isChecked(value) {
        this._switchLabelWrapperEl.nativeElement.classList.remove('fd-switch-no-animate');
        this._cva.setValue(value);
        this.checkedChange.emit(value);
        setTimeout(() => {
            // add the no-animate class after the transition duration, 100ms
            this._switchLabelWrapperEl.nativeElement.classList.add('fd-switch-no-animate');
        }, 100);
    }
    get isChecked() {
        return this._cva.value;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SwitchComponent, deps: [{ token: i1.ContentDensityObserver }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: SwitchComponent, isStandalone: true, selector: "fd-switch", inputs: { activeText: "activeText", inactiveText: "inactiveText", id: "id", required: "required", checked: "checked", semantic: "semantic", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy" }, outputs: { checkedChange: "checkedChange" }, host: { listeners: { "focusout": "_cva.onTouched()" }, properties: { "attr.id": "id" }, classAttribute: "fd-form__item fd-form__item--check fd-switch-custom" }, providers: [
            CvaControl,
            { provide: FD_FORM_FIELD_CONTROL, useExisting: SwitchComponent, multi: true },
            registerFormItemControl(SwitchComponent),
            contentDensityObserverProviders()
        ], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["switchInput"], descendants: true }, { propertyName: "_switchLabelWrapperEl", first: true, predicate: ["switchEl"], descendants: true, read: ElementRef }], hostDirectives: [{ directive: i2.CvaDirective, inputs: ["state", "state", "stateMessage", "stateMessage", "disabled", "disabled", "name", "name", "readonly", "readonly", "ariaLabelledBy", "ariaLabelledBy", "ariaLabel", "ariaLabel"] }], ngImport: i0, template: "<label\n    class=\"fd-switch fd-switch-no-animate\"\n    (click)=\"focus()\"\n    [style.cursor]=\"_cva.disabled ? 'auto' : 'pointer'\"\n    [class.is-compact]=\"_contentDensityObserver.isCompactSignal()\"\n    [class.fd-switch--semantic]=\"semantic\"\n    [class.fd-switch--text]=\"activeText || inactiveText\"\n    [class.is-disabled]=\"_cva.disabled\"\n    [attr.aria-label]=\"_cva.ariaLabel\"\n    #switchEl\n>\n    <span class=\"fd-switch__control\">\n        <input\n            #switchInput\n            class=\"fd-switch__input\"\n            type=\"checkbox\"\n            role=\"switch\"\n            [id]=\"innerInputId\"\n            [attr.name]=\"_cva.name\"\n            [disabled]=\"_cva.disabled\"\n            [attr.aria-required]=\"_cva.required\"\n            [attr.aria-checked]=\"_cva.value\"\n            [attr.aria-labelledby]=\"_cva.ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n            [(ngModel)]=\"isChecked\"\n        />\n        <div class=\"fd-switch__slider\">\n            <div class=\"fd-switch__track\" aria-hidden=\"true\">\n                @if (activeText) {\n                    <span class=\"fd-switch__text fd-switch__text--on\">\n                        {{ activeText }}\n                    </span>\n                } @else {\n                    <fd-icon role=\"presentation\" class=\"fd-switch__icon fd-switch__icon--on\" glyph=\"accept\"></fd-icon>\n                }\n                <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n                @if (inactiveText) {\n                    <span class=\"fd-switch__text fd-switch__text--off\">\n                        {{ inactiveText }}\n                    </span>\n                } @else {\n                    <fd-icon\n                        role=\"presentation\"\n                        class=\"fd-switch__icon--off fd-switch__icon\"\n                        [glyph]=\"semantic ? 'decline' : 'less'\"\n                    ></fd-icon>\n                }\n            </div>\n            @if (semantic) {\n                <span [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n                    {{\n                        _cva.value\n                            ? ('coreSwitch.semanticAcceptLabel' | fdTranslate)()\n                            : ('coreSwitch.semanticDeclineLabel' | fdTranslate)()\n                    }}\n                </span>\n            }\n        </div>\n    </span>\n</label>\n", styles: [".fd-switch{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;max-width:100%;overflow:hidden;padding-block:0;padding-inline:0;position:relative;text-overflow:ellipsis;white-space:nowrap;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;-webkit-margin-end:.5rem;cursor:text;margin-inline-end:.5rem;-ms-flex-item-align:start;align-self:flex-start;--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Handle_Offset)*-1),-50%);display:-webkit-box;display:-ms-flexbox;display:flex;overflow:initial;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;margin-inline:0;padding-block:var(--fdSwitch_Padding,.625rem);padding-inline:.3125rem}.fd-switch:after,.fd-switch:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Active_Handle_Offset)*-1),-50%)}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{cursor:auto}.fd-switch__control{display:inline-block;position:relative}.fd-switch__slider{background-color:var(--fdSwitch_Track_Background);border:0;border:var(--fdSwitch_Border);border-color:var(--fdSwitch_Border_Color);border-radius:var(--fdSwitch_Border_Radius);-webkit-box-shadow:var(--fdSwitch_Shadow);box-shadow:var(--fdSwitch_Shadow);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-sizing:content-box;box-sizing:content-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdSwitch_Height);line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-transition:all .1s;transition:all .1s;width:var(--fdSwitch_Width)}.fd-switch__slider:after,.fd-switch__slider:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-switch__track{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;position:absolute;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-width:4.25rem;top:50%;-webkit-transform:var(--fdSwitch_Track_Offset);transform:var(--fdSwitch_Track_Offset);-webkit-transition:all .1s;transition:all .1s}.fd-switch__track:after,.fd-switch__track:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-switch__text{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-family:var(--sapFontSemiboldDuplexFamily);font-size:var(--sapFontSmallSize);line-height:1;position:var(--fdSwitch_Semantic_Icon_Position);text-transform:uppercase;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__text--off{color:var(--fdSwitch_Text_Inactive_Color)}.fd-switch__text--on{color:var(--fdSwitch_Text_Active_Color);opacity:0;visibility:hidden}.fd-switch__icon{position:var(--fdSwitch_Semantic_Icon_Position)}.fd-switch__icon [class*=sap-icon],.fd-switch__icon[class*=sap-icon]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:var(--fdSwitch_Icon_Display);font-size:var(--fdSwitch_Icon_Size);line-height:1.375rem;min-width:1.75rem;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__icon--off [class*=sap-icon],.fd-switch__icon--off[class*=sap-icon]{color:var(--fdSwitch_Handle_Inactive_Color);margin-block:0;margin-inline:var(--fdSwitch_Icon_Error_Margin)}.fd-switch__icon--on [class*=sap-icon],.fd-switch__icon--on[class*=sap-icon]{color:var(--fdSwitch_Handle_Active_Color);margin-block:0;margin-inline:var(--fdSwitch_Icon_Success_Margin);opacity:0;visibility:hidden}.fd-switch__handle{background-clip:padding-box;background-color:var(--fdSwitch_Handle_Background);border:0;border:var(--fdSwitch_Handle_Border_Width) solid var(--fdSwitch_Handle_Border_Color);border-radius:var(--fdSwitch_Handle_Border_Radius);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-sizing:var(--fdSwitch_Slider_Box_Sizing);box-sizing:var(--fdSwitch_Slider_Box_Sizing);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;min-height:var(--fdSwitch_Handle_Height);min-width:var(--fdSwitch_Handle_Width);padding-block:0;padding-inline:0}.fd-switch__handle:after,.fd-switch__handle:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-switch__input{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:0;line-height:normal;margin-block:0;margin-inline:0;opacity:0;padding-block:0;padding-inline:0;position:absolute;width:0}.fd-switch__input:after,.fd-switch__input:before{-webkit-box-sizing:inherit;box-sizing:inherit;display:none;font-size:inherit}.fd-switch__input:active,.fd-switch__input:hover{border-color:transparent}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}.fd-switch__input:focus+.fd-switch__slider:before{border-color:var(--sapContent_FocusColor);border-radius:var(--fdSwitch_Focus_Outline_Border_Radius);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);content:\"\";display:block;inset:var(--fdSwitch_Focus_Outline_Vertical_Offset) var(--fdSwitch_Focus_Outline_Horizontal_Offset) var(--fdSwitch_Focus_Outline_Vertical_Offset) var(--fdSwitch_Focus_Outline_Horizontal_Offset);position:absolute}.fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--sapButton_Track_Selected_Background);--fdSwitch_Shadow:var(--fdSwitch_Active_Shadow);--fdSwitch_Handle_Background:var(--sapButton_Selected_Background);--fdSwitch_Handle_Border_Color:var(--sapButton_Selected_BorderColor);--fdSwitch_Border_Color:var(--sapButton_Selected_BorderColor)}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off[class*=sap-icon]{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on[class*=sap-icon]{opacity:1;visibility:visible}.fd-switch__input:checked+.fd-switch__slider .fd-switch__text--off{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__text--on{opacity:1;visibility:visible}.fd-switch.is-hover,.fd-switch:hover{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Hover_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Background);--fdSwitch_Border_Color:var(--fdSwitch_On_Hover_Slider_Border)}.fd-switch.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Active_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Active_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Active_Background);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Selected_Hover_Border_Color)}.fd-switch[class*=-compact],.fd-switch[class*=-condensed],[class*=-compact] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Padding:var(--fdSwitch_Compact_Padding_Block);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Handle_Width);--fdSwitch_Handle_Height:var(--fdSwitch_Compact_Handle_Height);--fdSwitch_Width:var(--fdSwitch_Compact_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Height);--fdSwitch_Icon_Size:var(--fdSwitch_Compact_Icon_Size);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Handle_Offset),-50%)}.fd-switch[class*=-compact] .fd-switch__track,.fd-switch[class*=-condensed] .fd-switch__track,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__track,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__track{min-width:3.125rem}.fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Active_Handle_Offset),-50%)}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Handle_Offset),-50%)}.fd-switch[dir=rtl] .fd-switch__icon--on,[dir=rtl] .fd-switch .fd-switch__icon--on{margin-block:0;margin-inline:var(--fdSwitch_Icon_Error_Margin)}.fd-switch[dir=rtl] .fd-switch__icon--off,[dir=rtl] .fd-switch .fd-switch__icon--off{margin-block:0;margin-inline:var(--fdSwitch_Icon_Success_Margin)}.fd-switch[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Active_Handle_Offset),-50%)}.fd-switch[dir=rtl][class*=-compact],.fd-switch[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch:not([class*=-cozy]),[dir=rtl] .fd-switch[class*=-compact],[dir=rtl] .fd-switch[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Handle_Offset)*-1),-50%)}.fd-switch[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Active_Handle_Offset)*-1),-50%)}.fd-switch--semantic{--fdSwitch_Icon_Display:flex;--fdSwitch_Width:var(--fdSwitch_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Semantic_Height);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Border_Color);--fdSwitch_Border_Color:var(--sapErrorBorderColor);--fdSwitch_Handle_Active_Color:var(--fdSwitch_Semantic_Handle_Success_Color);--fdSwitch_Handle_Inactive_Color:var(--fdSwitch_Semantic_Handle_Error_Color);--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Active_Offset)*-1),-50%);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Success_Box_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Background_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color)}.fd-switch--semantic[class*=-compact],.fd-switch--semantic[class*=-condensed],[class*=-compact] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Semantic_Height);padding-block:.1875rem;padding-inline:0;--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)),-50%)}.fd-switch--semantic.is-hover,.fd-switch--semantic:hover{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Hover_Border_Color);--fdSwitch_Semantic_Handle_Error_Color:var(--fdSwitch_Semantic_Hover_Error_Color);--fdSwitch_Semantic_Handle_Success_Color:var(--fdSwitch_Semantic_Hover_Success_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Error_Border_Color)}.fd-switch--semantic.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Success_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Hover_Border_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Success_Border_Color)}.fd-switch--semantic[dir=rtl],[dir=rtl] .fd-switch--semantic{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Active_Offset),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact],.fd-switch--semantic[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[dir=rtl] .fd-switch--semantic[class*=-compact],[dir=rtl] .fd-switch--semantic[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)*-1),-50%)}.fd-switch--text{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Text_Handle_Offset),-50%);--fdSwitch_Width:var(--fdSwitch_Text_Width);--fdSwitch_Handle_Width:var(--fdSwitch_Text_Handle_Width)}.fd-switch--text .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Text_Handle_Active_Offset),-50%)}.fd-switch--text[class*=-compact],.fd-switch--text[class*=-condensed],[class*=-compact] .fd-switch--text:not([class*=-cozy]),[class*=-condensed] .fd-switch--text:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Text_Width);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Text_Handle_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Text_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Text_Handle_Offset),-50%)}.fd-switch--text[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--text[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Text_Handle_Active_Offset),-50%)}.fd-switch--text[dir=rtl],[dir=rtl] .fd-switch--text{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Text_Handle_Offset)*-1),-50%)}.fd-switch--text[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Text_Handle_Active_Offset)*-1),-50%)}.fd-switch--text[dir=rtl][class*=-compact],.fd-switch--text[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--text[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--text:not([class*=-cozy]),[class*=-condensed] .fd-switch--text[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--text:not([class*=-cozy]),[dir=rtl] .fd-switch--text[class*=-compact],[dir=rtl] .fd-switch--text[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Text_Handle_Offset)*-1),-50%)}.fd-switch--text[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--text[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--text[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--text[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Text_Handle_Active_Offset)*-1),-50%)}.fd-switch-custom{display:block}.fd-switch__invisible-text{display:none!important}.fd-switch-no-animate *{transition:none!important}\n/*! Bundled license information:\n\nfundamental-styles/dist/switch.css:\n  (*!\n   * Fundamental Library Styles v0.41.7\n   * Copyright (c) 2026 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "color", "background", "size", "class", "ariaLabel", "ariaHidden"], outputs: ["ariaHiddenChange"] }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SwitchComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-switch', providers: [
                        CvaControl,
                        { provide: FD_FORM_FIELD_CONTROL, useExisting: SwitchComponent, multi: true },
                        registerFormItemControl(SwitchComponent),
                        contentDensityObserverProviders()
                    ], host: {
                        class: 'fd-form__item fd-form__item--check fd-switch-custom',
                        '[attr.id]': 'id',
                        '(focusout)': '_cva.onTouched()'
                    }, hostDirectives: [
                        {
                            directive: CvaDirective,
                            inputs: ['state', 'stateMessage', 'disabled', 'name', 'readonly', 'ariaLabelledBy', 'ariaLabel']
                        }
                    ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, FdTranslatePipe, IconComponent], template: "<label\n    class=\"fd-switch fd-switch-no-animate\"\n    (click)=\"focus()\"\n    [style.cursor]=\"_cva.disabled ? 'auto' : 'pointer'\"\n    [class.is-compact]=\"_contentDensityObserver.isCompactSignal()\"\n    [class.fd-switch--semantic]=\"semantic\"\n    [class.fd-switch--text]=\"activeText || inactiveText\"\n    [class.is-disabled]=\"_cva.disabled\"\n    [attr.aria-label]=\"_cva.ariaLabel\"\n    #switchEl\n>\n    <span class=\"fd-switch__control\">\n        <input\n            #switchInput\n            class=\"fd-switch__input\"\n            type=\"checkbox\"\n            role=\"switch\"\n            [id]=\"innerInputId\"\n            [attr.name]=\"_cva.name\"\n            [disabled]=\"_cva.disabled\"\n            [attr.aria-required]=\"_cva.required\"\n            [attr.aria-checked]=\"_cva.value\"\n            [attr.aria-labelledby]=\"_cva.ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n            [(ngModel)]=\"isChecked\"\n        />\n        <div class=\"fd-switch__slider\">\n            <div class=\"fd-switch__track\" aria-hidden=\"true\">\n                @if (activeText) {\n                    <span class=\"fd-switch__text fd-switch__text--on\">\n                        {{ activeText }}\n                    </span>\n                } @else {\n                    <fd-icon role=\"presentation\" class=\"fd-switch__icon fd-switch__icon--on\" glyph=\"accept\"></fd-icon>\n                }\n                <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n                @if (inactiveText) {\n                    <span class=\"fd-switch__text fd-switch__text--off\">\n                        {{ inactiveText }}\n                    </span>\n                } @else {\n                    <fd-icon\n                        role=\"presentation\"\n                        class=\"fd-switch__icon--off fd-switch__icon\"\n                        [glyph]=\"semantic ? 'decline' : 'less'\"\n                    ></fd-icon>\n                }\n            </div>\n            @if (semantic) {\n                <span [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n                    {{\n                        _cva.value\n                            ? ('coreSwitch.semanticAcceptLabel' | fdTranslate)()\n                            : ('coreSwitch.semanticDeclineLabel' | fdTranslate)()\n                    }}\n                </span>\n            }\n        </div>\n    </span>\n</label>\n", styles: [".fd-switch{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;max-width:100%;overflow:hidden;padding-block:0;padding-inline:0;position:relative;text-overflow:ellipsis;white-space:nowrap;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;-webkit-margin-end:.5rem;cursor:text;margin-inline-end:.5rem;-ms-flex-item-align:start;align-self:flex-start;--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Handle_Offset)*-1),-50%);display:-webkit-box;display:-ms-flexbox;display:flex;overflow:initial;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;margin-inline:0;padding-block:var(--fdSwitch_Padding,.625rem);padding-inline:.3125rem}.fd-switch:after,.fd-switch:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Active_Handle_Offset)*-1),-50%)}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{cursor:auto}.fd-switch__control{display:inline-block;position:relative}.fd-switch__slider{background-color:var(--fdSwitch_Track_Background);border:0;border:var(--fdSwitch_Border);border-color:var(--fdSwitch_Border_Color);border-radius:var(--fdSwitch_Border_Radius);-webkit-box-shadow:var(--fdSwitch_Shadow);box-shadow:var(--fdSwitch_Shadow);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-sizing:content-box;box-sizing:content-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdSwitch_Height);line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-transition:all .1s;transition:all .1s;width:var(--fdSwitch_Width)}.fd-switch__slider:after,.fd-switch__slider:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-switch__track{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;position:absolute;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-width:4.25rem;top:50%;-webkit-transform:var(--fdSwitch_Track_Offset);transform:var(--fdSwitch_Track_Offset);-webkit-transition:all .1s;transition:all .1s}.fd-switch__track:after,.fd-switch__track:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-switch__text{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-family:var(--sapFontSemiboldDuplexFamily);font-size:var(--sapFontSmallSize);line-height:1;position:var(--fdSwitch_Semantic_Icon_Position);text-transform:uppercase;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__text--off{color:var(--fdSwitch_Text_Inactive_Color)}.fd-switch__text--on{color:var(--fdSwitch_Text_Active_Color);opacity:0;visibility:hidden}.fd-switch__icon{position:var(--fdSwitch_Semantic_Icon_Position)}.fd-switch__icon [class*=sap-icon],.fd-switch__icon[class*=sap-icon]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:var(--fdSwitch_Icon_Display);font-size:var(--fdSwitch_Icon_Size);line-height:1.375rem;min-width:1.75rem;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__icon--off [class*=sap-icon],.fd-switch__icon--off[class*=sap-icon]{color:var(--fdSwitch_Handle_Inactive_Color);margin-block:0;margin-inline:var(--fdSwitch_Icon_Error_Margin)}.fd-switch__icon--on [class*=sap-icon],.fd-switch__icon--on[class*=sap-icon]{color:var(--fdSwitch_Handle_Active_Color);margin-block:0;margin-inline:var(--fdSwitch_Icon_Success_Margin);opacity:0;visibility:hidden}.fd-switch__handle{background-clip:padding-box;background-color:var(--fdSwitch_Handle_Background);border:0;border:var(--fdSwitch_Handle_Border_Width) solid var(--fdSwitch_Handle_Border_Color);border-radius:var(--fdSwitch_Handle_Border_Radius);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-sizing:var(--fdSwitch_Slider_Box_Sizing);box-sizing:var(--fdSwitch_Slider_Box_Sizing);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;min-height:var(--fdSwitch_Handle_Height);min-width:var(--fdSwitch_Handle_Width);padding-block:0;padding-inline:0}.fd-switch__handle:after,.fd-switch__handle:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-switch__input{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:0;line-height:normal;margin-block:0;margin-inline:0;opacity:0;padding-block:0;padding-inline:0;position:absolute;width:0}.fd-switch__input:after,.fd-switch__input:before{-webkit-box-sizing:inherit;box-sizing:inherit;display:none;font-size:inherit}.fd-switch__input:active,.fd-switch__input:hover{border-color:transparent}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}.fd-switch__input:focus+.fd-switch__slider:before{border-color:var(--sapContent_FocusColor);border-radius:var(--fdSwitch_Focus_Outline_Border_Radius);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);content:\"\";display:block;inset:var(--fdSwitch_Focus_Outline_Vertical_Offset) var(--fdSwitch_Focus_Outline_Horizontal_Offset) var(--fdSwitch_Focus_Outline_Vertical_Offset) var(--fdSwitch_Focus_Outline_Horizontal_Offset);position:absolute}.fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--sapButton_Track_Selected_Background);--fdSwitch_Shadow:var(--fdSwitch_Active_Shadow);--fdSwitch_Handle_Background:var(--sapButton_Selected_Background);--fdSwitch_Handle_Border_Color:var(--sapButton_Selected_BorderColor);--fdSwitch_Border_Color:var(--sapButton_Selected_BorderColor)}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off[class*=sap-icon]{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on[class*=sap-icon]{opacity:1;visibility:visible}.fd-switch__input:checked+.fd-switch__slider .fd-switch__text--off{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__text--on{opacity:1;visibility:visible}.fd-switch.is-hover,.fd-switch:hover{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Hover_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Background);--fdSwitch_Border_Color:var(--fdSwitch_On_Hover_Slider_Border)}.fd-switch.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Active_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Active_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Active_Background);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Selected_Hover_Border_Color)}.fd-switch[class*=-compact],.fd-switch[class*=-condensed],[class*=-compact] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Padding:var(--fdSwitch_Compact_Padding_Block);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Handle_Width);--fdSwitch_Handle_Height:var(--fdSwitch_Compact_Handle_Height);--fdSwitch_Width:var(--fdSwitch_Compact_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Height);--fdSwitch_Icon_Size:var(--fdSwitch_Compact_Icon_Size);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Handle_Offset),-50%)}.fd-switch[class*=-compact] .fd-switch__track,.fd-switch[class*=-condensed] .fd-switch__track,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__track,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__track{min-width:3.125rem}.fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Active_Handle_Offset),-50%)}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Handle_Offset),-50%)}.fd-switch[dir=rtl] .fd-switch__icon--on,[dir=rtl] .fd-switch .fd-switch__icon--on{margin-block:0;margin-inline:var(--fdSwitch_Icon_Error_Margin)}.fd-switch[dir=rtl] .fd-switch__icon--off,[dir=rtl] .fd-switch .fd-switch__icon--off{margin-block:0;margin-inline:var(--fdSwitch_Icon_Success_Margin)}.fd-switch[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Active_Handle_Offset),-50%)}.fd-switch[dir=rtl][class*=-compact],.fd-switch[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch:not([class*=-cozy]),[dir=rtl] .fd-switch[class*=-compact],[dir=rtl] .fd-switch[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Handle_Offset)*-1),-50%)}.fd-switch[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Active_Handle_Offset)*-1),-50%)}.fd-switch--semantic{--fdSwitch_Icon_Display:flex;--fdSwitch_Width:var(--fdSwitch_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Semantic_Height);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Border_Color);--fdSwitch_Border_Color:var(--sapErrorBorderColor);--fdSwitch_Handle_Active_Color:var(--fdSwitch_Semantic_Handle_Success_Color);--fdSwitch_Handle_Inactive_Color:var(--fdSwitch_Semantic_Handle_Error_Color);--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Active_Offset)*-1),-50%);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Success_Box_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Background_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color)}.fd-switch--semantic[class*=-compact],.fd-switch--semantic[class*=-condensed],[class*=-compact] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Semantic_Height);padding-block:.1875rem;padding-inline:0;--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)),-50%)}.fd-switch--semantic.is-hover,.fd-switch--semantic:hover{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Hover_Border_Color);--fdSwitch_Semantic_Handle_Error_Color:var(--fdSwitch_Semantic_Hover_Error_Color);--fdSwitch_Semantic_Handle_Success_Color:var(--fdSwitch_Semantic_Hover_Success_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Error_Border_Color)}.fd-switch--semantic.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Success_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Hover_Border_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Success_Border_Color)}.fd-switch--semantic[dir=rtl],[dir=rtl] .fd-switch--semantic{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Active_Offset),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact],.fd-switch--semantic[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[dir=rtl] .fd-switch--semantic[class*=-compact],[dir=rtl] .fd-switch--semantic[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)*-1),-50%)}.fd-switch--text{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Text_Handle_Offset),-50%);--fdSwitch_Width:var(--fdSwitch_Text_Width);--fdSwitch_Handle_Width:var(--fdSwitch_Text_Handle_Width)}.fd-switch--text .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Text_Handle_Active_Offset),-50%)}.fd-switch--text[class*=-compact],.fd-switch--text[class*=-condensed],[class*=-compact] .fd-switch--text:not([class*=-cozy]),[class*=-condensed] .fd-switch--text:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Text_Width);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Text_Handle_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Text_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Text_Handle_Offset),-50%)}.fd-switch--text[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--text[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Text_Handle_Active_Offset),-50%)}.fd-switch--text[dir=rtl],[dir=rtl] .fd-switch--text{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Text_Handle_Offset)*-1),-50%)}.fd-switch--text[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Text_Handle_Active_Offset)*-1),-50%)}.fd-switch--text[dir=rtl][class*=-compact],.fd-switch--text[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--text[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--text:not([class*=-cozy]),[class*=-condensed] .fd-switch--text[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--text:not([class*=-cozy]),[dir=rtl] .fd-switch--text[class*=-compact],[dir=rtl] .fd-switch--text[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Text_Handle_Offset)*-1),-50%)}.fd-switch--text[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--text[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--text[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--text[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Text_Handle_Active_Offset)*-1),-50%)}.fd-switch-custom{display:block}.fd-switch__invisible-text{display:none!important}.fd-switch-no-animate *{transition:none!important}\n/*! Bundled license information:\n\nfundamental-styles/dist/switch.css:\n  (*!\n   * Fundamental Library Styles v0.41.7\n   * Copyright (c) 2026 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"] }]
        }], ctorParameters: () => [{ type: i1.ContentDensityObserver }], propDecorators: { inputElement: [{
                type: ViewChild,
                args: ['switchInput']
            }], activeText: [{
                type: Input
            }], inactiveText: [{
                type: Input
            }], id: [{
                type: Input
            }], required: [{
                type: Input
            }], checked: [{
                type: Input
            }], semantic: [{
                type: Input
            }], ariaLabel: [{
                type: Input
            }], ariaLabelledBy: [{
                type: Input
            }], checkedChange: [{
                type: Output
            }], _switchLabelWrapperEl: [{
                type: ViewChild,
                args: ['switchEl', { read: ElementRef }]
            }] } });

/**
 * @deprecated
 * Use direct imports of components and directives.
 */
class SwitchModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: SwitchModule, imports: [SwitchComponent], exports: [SwitchComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SwitchModule, imports: [SwitchComponent] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SwitchModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [SwitchComponent],
                    exports: [SwitchComponent]
                }]
        }] });

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

export { SwitchComponent, SwitchModule };
//# sourceMappingURL=fundamental-ngx-core-switch.mjs.map
