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: '6232bf838f2a1b663ed1968c7914f395c6d62858' }, h("div", { key: 'd0695a5caf7ec5257dd3a2d5da4e37c337b018a7', slot: "heading", class: "heading" }, h("div", { key: '9c5243a7afe63ab2061e109a4147e9b324673b68', class: "title" }, "e-Signature Disclosures"), h("div", { key: '39cf593e67252903cc708fe5ea3b6a52d3bebc96', class: "close-button" }, h("svg", { key: '7f68ec316ac6f07a53b941082e8aa671052b7e0a', width: "24", height: "28", viewBox: "0 0 24 28", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '3ec4f7b72bebd1f96586e8d84d1bbf71000cf698', 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: '0b1d69f4b1cc37d0061d7e30da9a839c730716cf', slot: "content", class: "content" }, h("div", { key: '6ece0fd03c97d8c89a0d91321651c51629b2cddd', innerHTML: this.disclosures }), h("div", { key: '6231a8dff94ada420cd20a67d4e87cd7b13f642a', class: "accept" }, h("verdocs-checkbox", { key: 'e975f89c43b32badd9138645d89422ddf9f5959f', 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: '182231c07d93b70ec617def91c857abd2e47dd50', 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
