import { p as proxyCustomElement, H, c as createEvent, h } from './p-CUAGH_8P.js';
import { d as defineCustomElement$1 } from './p-Ba_mXs1J.js';

const verdocsQuestionDialogCss = "verdocs-question-dialog{top:0;left:0;right:0;bottom:0;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-question-dialog.closed{display:none}verdocs-question-dialog textarea{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:14px;padding:9px;outline:none}verdocs-question-dialog .heading .title{font-size:18px}verdocs-question-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:24px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;border-radius:6px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button.cancel{background-color:#654dcb}verdocs-question-dialog .buttons button.ok{background-color:#55bc81}verdocs-question-dialog .buttons button.ok.single{max-width:150px}verdocs-question-dialog .buttons button:disabled{background-color:#6c727f}";

const QuestionIcon = `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#ffffff"/></svg>`;
const VerdocsQuestionDialog = /*@__PURE__*/ proxyCustomElement(class VerdocsQuestionDialog extends H {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
        this.next = createEvent(this, "next");
        this.exit = createEvent(this, "exit");
        this.question = '';
        this.closed = false;
    }
    handleOk() {
        this.next.emit({ question: this.question });
    }
    handleCancel() {
        this.exit.emit();
    }
    // We need a separate event handler for clicking the background because it can receive events "through" other child components
    handleDismiss(e) {
        this.closed = true;
        if (e.target.className === 'background-overlay') {
            e.preventDefault();
            this.exit.emit();
        }
    }
    render() {
        return (h("verdocs-dialog", { key: 'd0e85744fa9901d1be794cd59f4c9b87922e6e91', onExit: e => this.handleDismiss(e) }, h("div", { key: '6d7ead703cdf217588ac98d2ac93a35644838b78', slot: "heading", class: "heading" }, h("div", { key: 'd07c6155fc98f51204a51add33d82afec7592c4b', class: "icon", innerHTML: QuestionIcon }), h("div", { key: 'e9698d0aa4b24db343afd149adee95d9c3c0a52a', class: "title" }, "Ask the Sender a Question")), h("div", { key: 'cdef7a2b00c4c66e1748733e3c614e39ad456192', slot: "content", class: "content" }, h("textarea", { key: '81c88e1d61be54e7ba80c9101fb71bf903df8d1c', name: "question", rows: 6, placeholder: "Enter your question...", onInput: (e) => (this.question = e.target.value) }, this.question)), h("div", { key: 'a7d5a31362337e6c80c0ac5b2c6471efbacb9a23', class: "footer", slot: "footer" }, h("div", { key: '71ae8344f053cfd94dc6befed76933fe67f490d1', class: "buttons" }, h("button", { key: '04aec379b7b4f21885f72ed2016b10ac26730476', class: "cancel", onClick: () => this.handleCancel() }, "Cancel"), h("button", { key: '6e6e8bb27367c9a1167a49519da299d9ce9ee983', class: 'ok', onClick: () => this.handleOk() }, "OK")))));
    }
    static get style() { return verdocsQuestionDialogCss; }
}, [256, "verdocs-question-dialog", {
        "question": [1025],
        "closed": [32]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["verdocs-question-dialog", "verdocs-dialog"];
    components.forEach(tagName => { switch (tagName) {
        case "verdocs-question-dialog":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, VerdocsQuestionDialog);
            }
            break;
        case "verdocs-dialog":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}

export { VerdocsQuestionDialog as V, defineCustomElement as d };
//# sourceMappingURL=p-RN0C-eM1.js.map

//# sourceMappingURL=p-RN0C-eM1.js.map