import { DEFAULT_DISCLOSURES } from "@verdocs/js-sdk";
import { h } from "@stencil/core";
/**
 * Display e-signing disclosures with options to delegate, decline or proceed.
 */
export class VerdocsDisclosureDialog {
    constructor() {
        /**
         * The disclosures to display.
         */
        this.disclosures = DEFAULT_DISCLOSURES;
        /**
         * If the recipient may delegate, an additional button will be shown to drive this flow.
         */
        this.delegator = false;
        this.accepted = false;
    }
    render() {
        return (h("verdocs-dialog", { key: 'c54b91e1bef28762ac7c19c1e3550fa01f3de969' }, h("div", { key: '7a1205b9c02ba0f2783cc2bced7159476ab58312', slot: "heading", class: "heading" }, h("div", { key: '1a6322248cff563a356cf3fa81e8674ee4bd65c0', class: "title" }, "e-Signature Disclosures"), h("div", { key: 'b66b4b470436aea3f0a8e0e8f5ae2e0359482f72', class: "close-button" }, h("svg", { key: '7eecdda97fb2a67fd2bd564dcd2b353a766d0f0f', width: "24", height: "28", viewBox: "0 0 24 28", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'c0b39af065ffeab6d22d620e619e2b8158f94936', d: "M4.39705 8.55379L4.46967 8.46967C4.73594 8.2034 5.1526 8.1792 5.44621 8.39705L5.53033 8.46967L12 14.939L18.4697 8.46967C18.7626 8.17678 19.2374 8.17678 19.5303 8.46967C19.8232 8.76256 19.8232 9.23744 19.5303 9.53033L13.061 16L19.5303 22.4697C19.7966 22.7359 19.8208 23.1526 19.6029 23.4462L19.5303 23.5303C19.2641 23.7966 18.8474 23.8208 18.5538 23.6029L18.4697 23.5303L12 17.061L5.53033 23.5303C5.23744 23.8232 4.76256 23.8232 4.46967 23.5303C4.17678 23.2374 4.17678 22.7626 4.46967 22.4697L10.939 16L4.46967 9.53033C4.2034 9.26406 4.1792 8.8474 4.39705 8.55379L4.46967 8.46967L4.39705 8.55379Z" })))), h("div", { key: '71f2feef64c84cfa4f6c71721e9f67769f69ab6e', slot: "content", class: "content" }, h("div", { key: '2782b5ad139ee5967da73b882d141012f32970f8', innerHTML: this.disclosures }), h("div", { key: 'afcd7ce832e04557edb5f7da1be3b9f83aa9ca3d', class: "accept" }, h("verdocs-checkbox", { key: '850b9bbd5471cc3a39c3c09e2c9a89e484b1b94b', label: "I accept the electronic signature disclosures and agree to proceed with digital signing.", checked: this.accepted, onInput: () => (this.accepted = !this.accepted) }))), h("div", { key: '24e72259fd1073e8df8a46cf22a9c68eb13e1fd8', class: "footer", slot: "footer" }, this.delegator ? (h("div", { class: "buttons" }, h("button", { class: "decline", onClick: () => this.decline.emit() }, "Decline"), h("button", { class: "delegate", onClick: () => this.delegate.emit() }, "Delegate"), h("button", { class: "proceed", onClick: () => this.accept.emit(), disabled: !this.accepted }, "Proceed"))) : (h("div", { class: "buttons" }, h("button", { class: "decline", onClick: () => this.decline.emit() }, "Decline"), h("button", { class: "proceed", onClick: () => this.accept.emit(), disabled: !this.accepted }, "Proceed"))))));
    }
    static get is() { return "verdocs-disclosure-dialog"; }
    static get originalStyleUrls() {
        return {
            "$": ["verdocs-disclosure-dialog.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["verdocs-disclosure-dialog.css"]
        };
    }
    static get properties() {
        return {
            "disclosures": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The disclosures to display."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "disclosures",
                "defaultValue": "DEFAULT_DISCLOSURES"
            },
            "delegator": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "If the recipient may delegate, an additional button will be shown to drive this flow."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "delegator",
                "defaultValue": "false"
            }
        };
    }
    static get states() {
        return {
            "accepted": {}
        };
    }
    static get events() {
        return [{
                "method": "decline",
                "name": "decline",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Event fired when the user chooses to decline."
                },
                "complexType": {
                    "original": "{first_name: string; last_name: string; email: string; phone: string; message: string}",
                    "resolved": "{ first_name: string; last_name: string; email: string; phone: string; message: string; }",
                    "references": {}
                }
            }, {
                "method": "delegate",
                "name": "delegate",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Event fired when the user chooses to delegate signing."
                },
                "complexType": {
                    "original": "{first_name: string; last_name: string; email: string; phone: string; message: string}",
                    "resolved": "{ first_name: string; last_name: string; email: string; phone: string; message: string; }",
                    "references": {}
                }
            }, {
                "method": "accept",
                "name": "accept",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Event fired when the user chooses to proceed."
                },
                "complexType": {
                    "original": "{first_name: string; last_name: string; email: string; phone: string; message: string}",
                    "resolved": "{ first_name: string; last_name: string; email: string; phone: string; message: string; }",
                    "references": {}
                }
            }];
    }
}
//# sourceMappingURL=verdocs-disclosure-dialog.js.map
