/*!
 * Built by ShiftSoftware
 * Copyright (c)
 */
import { h, Host } from "@stencil/core";
import cn from "../../global/lib/cn";
export class ShiftSwitch {
    async componentDidLoad() {
        this.inputRef = this.el.getElementsByClassName('shift-checkbox')[0];
    }
    async getInputRef() {
        return this.inputRef;
    }
    async getIsChecked() {
        return this.inputRef.checked;
    }
    render() {
        return (h(Host, { key: '4e98b7cb9c42dcbeacdff3b00d013c60aa72a90b', translate: "no" }, h("label", { key: 'be922caea4ea1afbc32a3a213cb8c92b19359dee', part: "shift-checkbox", class: cn('relative flex items-center cursor-pointer select-none', { 'opacity-75 cursor-default': this.disabled }) }, h("input", { key: '6066063a55309a686864f1be4c09193865726006', type: "checkbox", value: "true", name: this.name, checked: this.checked, disabled: this.disabled, onChange: this.onChange, class: "shift-checkbox peer hidden" }), h("div", { key: '1f77f345998e53bac750881043d8b170abc8fa88', class: "relative w-[50px] h-[24px] rounded-full border-2 border-blue-300 bg-blue-100 peer-checked:bg-blue-500 peer-checked:[&_div]:translate-x-[28px] peer-checked:border-blue-500 transition-colors duration-300" }, h("div", { key: '28282614bf061f89da16bf117e500018d8c1a4e9', class: "absolute top-[-2px] left-[-2px] size-[24px] rounded-full bg-white shadow-md transition-all duration-300 peer-checked:bg-blue-500" })), h("span", { key: '48895316a5ab7d6062867b1bf9f6f17cbdf611ec', class: "ms-2 text-gray-700" }, this.label))));
    }
    static get is() { return "shift-switch"; }
    static get originalStyleUrls() {
        return {
            "$": ["empty.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["empty.css"]
        };
    }
    static get properties() {
        return {
            "name": {
                "type": "string",
                "attribute": "name",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "label": {
                "type": "string",
                "attribute": "label",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "checked": {
                "type": "boolean",
                "attribute": "checked",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "disabled": {
                "type": "boolean",
                "attribute": "disabled",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "componentId": {
                "type": "string",
                "attribute": "component-id",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "componentClass": {
                "type": "string",
                "attribute": "component-class",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "onChange": {
                "type": "unknown",
                "attribute": "on-change",
                "mutable": false,
                "complexType": {
                    "original": "(event: Event) => void",
                    "resolved": "(event: Event) => void",
                    "references": {
                        "Event": {
                            "location": "global",
                            "id": "global::Event"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false
            }
        };
    }
    static get methods() {
        return {
            "getInputRef": {
                "complexType": {
                    "signature": "() => Promise<HTMLInputElement>",
                    "parameters": [],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        },
                        "HTMLInputElement": {
                            "location": "global",
                            "id": "global::HTMLInputElement"
                        }
                    },
                    "return": "Promise<HTMLInputElement>"
                },
                "docs": {
                    "text": "",
                    "tags": []
                }
            },
            "getIsChecked": {
                "complexType": {
                    "signature": "() => Promise<boolean>",
                    "parameters": [],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        }
                    },
                    "return": "Promise<boolean>"
                },
                "docs": {
                    "text": "",
                    "tags": []
                }
            }
        };
    }
    static get elementRef() { return "el"; }
}
