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

const verdocsQuestionDialogCss = "@-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-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: '2d25d6034f32f73872e4e23e18f8f611845462ef', onExit: e => this.handleDismiss(e) }, h("div", { key: 'ded100d23158a50e01441f97bae61ca8afd29aa1', slot: "heading", class: "heading" }, h("div", { key: 'be66073c69e8251d7f407da52cec6e9d66678b3b', class: "icon", innerHTML: QuestionIcon }), h("div", { key: 'dfd7af4e47911d2dcd6e42a27c7c0d70a013d9b7', class: "title" }, "Ask the Sender a Question")), h("div", { key: 'a085530805a7b43395af9188838252ed43fb1f98', slot: "content", class: "content" }, h("textarea", { key: 'f195beca773dc9b8ca4f7860aef766a107db98c8', name: "question", rows: 6, placeholder: "Enter your question...", onInput: (e) => (this.question = e.target.value) }, this.question)), h("div", { key: '0f2a3ea22986937baf9b88181053417c5f20538e', class: "footer", slot: "footer" }, h("div", { key: 'e36cc205b8bdbb65aac6874987b17e3c05becd5f', class: "buttons" }, h("button", { key: 'aafa5ec2ae697f8c234199db40c7b85c80efeba0', class: "cancel", onClick: () => this.handleCancel() }, "Cancel"), h("button", { key: '394fc179810c776d0ad1c7ec1a2429310c965388', 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-IF2BYQ14.js.map

//# sourceMappingURL=p-IF2BYQ14.js.map