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

const verdocsDelegateDialogCss = "verdocs-delegate-dialog{font-family:\"Inter\", \"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-delegate-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-delegate-dialog .heading .icon{}verdocs-delegate-dialog .heading .icon svg{fill:var(--verdocs-dialog-icon-color, #ffffff)}verdocs-delegate-dialog{}verdocs-delegate-dialog .verdocs-form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px;margin-bottom:24px}verdocs-delegate-dialog .verdocs-form-row{display:-ms-flexbox;display:flex;gap:16px;width:100%}verdocs-delegate-dialog .verdocs-form-row>*{-ms-flex:1;flex:1}verdocs-delegate-dialog .verdocs-form-label{font-size:13px;line-height:20px;font-weight:300;color:var(--verdocs-label-color, #616161);margin-bottom:2px;display:block}verdocs-delegate-dialog .verdocs-form-input{border:1px solid #d1d1d1;border-bottom-color:var(--verdocs-input-border-bottom-color, #d1d1d1);border-radius:4px;color:#707070;padding:8px 12px;font-size:14px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}verdocs-delegate-dialog .verdocs-form-input::-webkit-input-placeholder{color:#9ca3af}verdocs-delegate-dialog .verdocs-form-input::-moz-placeholder{color:#9ca3af}verdocs-delegate-dialog .verdocs-form-input:-ms-input-placeholder{color:#9ca3af}verdocs-delegate-dialog .verdocs-form-input::-ms-input-placeholder{color:#9ca3af}verdocs-delegate-dialog .verdocs-form-input::placeholder{color:#9ca3af}verdocs-delegate-dialog .verdocs-form-input:focus{outline:none;border-color:var(--verdocs-primary-color, #654dcb)}verdocs-delegate-dialog .buttons{gap:12px;display:-ms-flexbox;display:flex;margin-top:0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-delegate-dialog .buttons button{padding:8px 16px;height:40px;display:-ms-flexbox;display:flex;font-size:14px;font-weight:400;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:var(--verdocs-button-radius, 4px);-ms-flex-pack:center;justify-content:center;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}verdocs-delegate-dialog .buttons button.cancel{background-color:transparent;border:var(--verdocs-button-secondary-border, 1px solid #d1d5db);color:var(--verdocs-button-secondary-color, #374151)}verdocs-delegate-dialog .buttons button.proceed{background-color:var(--verdocs-primary-color, #55bc81);border:1px solid transparent;color:#ffffff}verdocs-delegate-dialog .buttons button.proceed:hover{background-color:var(--verdocs-primary-color-hover, #2b995b)}verdocs-delegate-dialog .buttons button:disabled{background-color:var(--verdocs-button-disabled-bg, #e5e7eb);color:var(--verdocs-button-disabled-color, #9ca3af);cursor:not-allowed}";

const VerdocsDelegateDialog = /*@__PURE__*/ proxyCustomElement(class VerdocsDelegateDialog extends H {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
        this.exit = createEvent(this, "exit");
        this.next = createEvent(this, "next");
        /**
         * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
         */
        this.endpoint = DefaultEndpoint;
        /**
         * The envelope to process.
         */
        this.envelope = null;
        this.first_name = '';
        this.last_name = '';
        this.email = '';
        this.phone = '';
        this.message = '';
    }
    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) {
        if (e.target.class === 'background-overlay') {
            e.preventDefault();
            this.handleCancel();
        }
    }
    // We need a separate event handler for clicking the background because it can receive events "through" other child components
    handleDelegate() {
        this.next.emit({
            first_name: this.first_name,
            last_name: this.last_name,
            email: this.email,
            phone: this.phone,
            message: this.message,
        });
    }
    render() {
        return (h("verdocs-dialog", { key: 'ba13ecc155bb843c98a9d8768b16ec5c4c1d371d' }, h("div", { key: '95ac7a62a85e1e6749da297a507c77d83b53cd3c', slot: "heading", class: "heading" }, h("div", { key: '1c927f72ada6f137617321aa72fa513e4f6e94c0', class: "icon" }, h("svg", { key: '4b36c1d368c193463d225e91f8c2f5321161a8ce', width: "22", height: "19", viewBox: "0 0 22 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { key: 'b2b798c555b0c822bd70037f8d7822e19ed751bd', "clip-path": "url(#clip0_34208_4881)" }, h("path", { key: '98b7b44cd4a0ba118fe39d1c16482921777a764e', d: "M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z" })), h("defs", { key: '787596228bcc714055e52cdb7577ae6d9b158c47' }, h("clipPath", { key: 'c30f1096fb73275c5e096098ef0e076f18ffa137', id: "clip0_34208_4881" }, h("path", { key: '0a7a76bf76a4e5a2fa4ebd5b9b058dd98b2c218d', d: "M0.875 0.75H21.125V18.75H0.875V0.75Z", fill: "white" }))))), h("div", { key: '03555e4bc46cae9d8dfd3a2e2b94739d75f3932c', class: "title" }, "Delegate Signing")), h("div", { key: '16e14e947e7cad24fe9d9c6cfbb9921804340db0', slot: "content", class: "content" }, h("div", { key: 'c6cf1303be070f4b9fdf2d66c3ddcd9f96dee03e', class: "verdocs-form" }, h("div", { key: '3db901add742ee678c6a71de29b1feedd98eed88', class: "verdocs-form-row" }, h("div", { key: '6e0a498c42a06e39b4210bde2e6804aff5f77c25', class: "field-group" }, h("label", { key: 'dde423e5cf3b4e8779ec8d3f07ccf3aceb79bba0', htmlFor: "verdocs-delegate-first", class: "verdocs-form-label" }, "New Recipient*"), h("input", { key: '9fc5096acf857b2dcd3869d5624bf3e92a837ffe', type: "text", id: "verdocs-delegate-first", name: "verdocs-delegate-first", class: "verdocs-form-input", autocomplete: "blocked", placeholder: "First name", value: this.first_name, onInput: (e) => (this.first_name = e.target.value) })), h("div", { key: '518296ccd696fb4cc4f5e346d59b9311925389bb', class: "field-group" }, h("label", { key: '31b2d88d23102213843e12f402c8790aa721f04f', htmlFor: "verdocs-delegate-last", class: "verdocs-form-label" }, "\u00A0"), h("input", { key: '541aba386a12c2633173835038f06c215f8884fa', type: "text", id: "verdocs-delegate-last", name: "verdocs-delegate-last", class: "verdocs-form-input", autocomplete: "blocked", placeholder: "Last name", value: this.last_name, onInput: (e) => (this.last_name = e.target.value) }))), h("div", { key: 'f41b0bf11819e8c07c251565de14c1f8f6bfd4c5' }, h("label", { key: 'b44d558f6c0f7caeadfd51b3e86c30c38487e377', htmlFor: "verdocs-delegate-email", class: "verdocs-form-label" }, "Email Address*"), h("input", { key: 'ef443da2122be9f09bf0a4bf9664eebe4f9d31d4', type: "text", id: "verdocs-delegate-email", name: "verdocs-delegate-email", class: "verdocs-form-input", autocomplete: "blocked", placeholder: "New recipient email address", value: this.email, onInput: (e) => (this.email = e.target.value) })), h("div", { key: '2eba8ca2d67a72f0fbc0127f1b85a09ab35727cf' }, h("label", { key: '5ea8a29edb1da249d4c80a6b9a51a5bb531a1415', htmlFor: "verdocs-delegate-phone", class: "verdocs-form-label" }, "Phone Number*"), h("input", { key: '0e2fe53edb93638ac0fadf8c152a41a837772d3b', type: "text", id: "verdocs-delegate-phone", name: "verdocs-delegate-phone", class: "verdocs-form-input", autocomplete: "blocked", placeholder: "Optional phone number", value: this.phone, onInput: (e) => (this.phone = e.target.value) })), h("div", { key: '708c478736f2dabdca15b461ab708f61c4392bfc' }, h("label", { key: '410be9a8f6a3089cd157cc4fce144db44a55c654', htmlFor: "verdocs-delegate-message", class: "verdocs-form-label" }, "Message (optional)"), h("textarea", { key: 'e048e656c46fe435b80dc2eeed6f1837292fadaf', id: "verdocs-delegate-message", name: "verdocs-delegate-message", class: "verdocs-form-input", rows: 3, autocomplete: "blocked", placeholder: "Type message here...", onInput: (e) => (this.message = e.target.value) }, this.message)))), h("div", { key: '6bdc7cf1b8b1a131d43c1b1e36e72b3df2eff495', class: "footer", slot: "footer" }, h("div", { key: '10d7a92d94f45c75500ac4c9ecfd5a09bda17099', class: "buttons" }, h("button", { key: '147a2bd25684b9c920c4b612cdd192f76bbae013', class: "cancel", onClick: () => this.handleCancel() }, "Cancel"), h("button", { key: 'a76e39a7776aa3e277a5d337675d856019cbdce3', class: "proceed", onClick: () => this.handleDelegate(), disabled: !this.first_name || !this.last_name || !this.email }, "Delegate")))));
    }
    static get style() { return verdocsDelegateDialogCss; }
}, [256, "verdocs-delegate-dialog", {
        "endpoint": [1040],
        "envelope": [16],
        "first_name": [32],
        "last_name": [32],
        "email": [32],
        "phone": [32],
        "message": [32]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["verdocs-delegate-dialog", "verdocs-dialog"];
    components.forEach(tagName => { switch (tagName) {
        case "verdocs-delegate-dialog":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, VerdocsDelegateDialog);
            }
            break;
        case "verdocs-dialog":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}

export { VerdocsDelegateDialog as V, defineCustomElement as d };
//# sourceMappingURL=p-C8wZUc9E.js.map

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