import { r as registerInstance, c as createEvent, h } from './index-6vpKbd31.js';

const verdocsSwitchCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-switch{font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-switch .switch{display:-ms-inline-flexbox;display:inline-flex;height:24px;width:44px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:12px;border:transparent;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .switch.primary[data-state=checked]{background:#55bc81}verdocs-switch .switch.primary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .switch.secondary[data-state=checked]{background:#4c56cb}verdocs-switch .switch.secondary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .slider{display:block;width:20px;height:20px;border-radius:20px;background:#ffffff;-webkit-box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .slider[data-state=checked]{-webkit-transform:translateX(16px);transform:translateX(16px)}verdocs-switch .slider[data-state=unchecked]{-webkit-transform:translateX(-4px);transform:translateX(-4px)}verdocs-switch .switch.disabled.primary,verdocs-switch .switch.disabled.secondary{cursor:not-allowed;background:#666666}";

const VerdocsSwitch = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.checkedChange = createEvent(this, "checkedChange");
        this.checked = false;
        /**
         * Select purple or green treatments.
         */
        this.theme = 'primary';
        /**
         * Should the field be disabled?
         */
        this.disabled = false;
    }
    render() {
        return (h("button", { key: 'bde7a0db4ffaaadb079e90b4c31be3e34eda060b', value: "on", type: "button", role: "switch", class: `switch ${this.theme} ${this.disabled ? 'disabled' : ''}`, "data-state": this.checked ? 'checked' : 'unchecked', "aria-checked": this.checked ? 'checked' : 'unchecked', onClick: () => {
                var _a;
                if (!this.disabled) {
                    this.checked = !this.checked;
                    (_a = this.checkedChange) === null || _a === void 0 ? void 0 : _a.emit(this.checked);
                }
            } }, h("span", { key: '6a685215089a2df26bc6c9b90193b9708dc32034', "data-state": this.checked ? 'checked' : 'unchecked', class: "slider" })));
    }
};
VerdocsSwitch.style = verdocsSwitchCss;

export { VerdocsSwitch as verdocs_switch };
//# sourceMappingURL=verdocs-switch.entry.js.map

//# sourceMappingURL=verdocs-switch.entry.js.map