/*!
 * Built by ShiftSoftware
 * Copyright (c)
 */
import { h, Host } from "@stencil/core";
import cn from "../../global/lib/cn";
import { CheckIcon } from "../../global/assets/check-icon";
export class ShiftCheckbox {
    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: 'e1fb79ca053e9dfad31a9de1c1fc767054b59a47', translate: "no" }, h("label", { key: '4451ef709384f0ef13515e79df577006c72561ec', part: "shift-checkbox", class: cn('relative flex items-center cursor-pointer select-none', { 'opacity-75 cursor-default': this.disabled }) }, h("input", { key: 'd8dfdebe2c84bb1884351f9767d9e60e921f66c3', type: "checkbox", value: "true", name: this.name, checked: this.checked, disabled: this.disabled, onChange: this.onChange, class: "shift-checkbox peer hidden" }), h("span", { key: 'e747b08f8bdc8c5a3fcfdd61e3184daa3cf9085b', class: "relative size-[22px] rounded-[6px] flex items-center justify-center text-transparent peer-checked:text-white [&_.check-icon]:scale-0 peer-checked:[&_.check-icon]:scale-100 transition bg-transparent !duration-300 border-2 peer-checked:bg-blue-500 border-gray-400 peer-checked:border-blue-500 overflow-hidden" }, h(CheckIcon, { key: '95b098c225547869ca0f0ef846a4d7b8776fbbcf', class: "check-icon transition !duration-300 stroke-[3px]" })), h("span", { key: '8f95d2a2bde82ffece81d09e0c23555d24e76322', class: "ms-2 text-gray-700" }, this.label))));
    }
    static get is() { return "shift-checkbox"; }
    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"; }
}
