import { p as proxyCustomElement, H, c as createEvent, h } from './p-CUAGH_8P.js';

const verdocsSigningProgressCss = "@-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-signing-progress{position:fixed;top:64px;left:20px;z-index:900;display:block;font-family:var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif)}@media (max-width: 768px){verdocs-signing-progress{display:none}}verdocs-signing-progress .card{background:white;padding:16px;border-radius:8px;-webkit-box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);width:240px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}verdocs-signing-progress .header{font-size:14px;color:#111827}verdocs-signing-progress .header-completed{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;font-size:14px;font-weight:500;color:#111827}verdocs-signing-progress .description{font-size:12px;line-height:16px;color:#374151}verdocs-signing-progress .field-label{font-family:var(--verdocs-primary-font, var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif));font-size:0.75rem;line-height:1rem;font-weight:400;color:var(--verdocs-body-color, #242424)}verdocs-signing-progress .field-completed{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;font-size:0.75rem;line-height:1rem;font-weight:400;color:var(--verdocs-body-color, #242424)}verdocs-signing-progress .field-completed .text{position:relative;top:-2px}verdocs-signing-progress .separator{height:1px;background-color:#e5e7eb;width:100%}verdocs-signing-progress .btn{width:100%;height:32px;border-radius:4px;font-weight:600;font-size:0.75rem;line-height:1rem;cursor:pointer;border:1px solid transparent;-webkit-transition:all 0.2s;transition:all 0.2s;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-signing-progress .btn:disabled{background-color:#f0f0f0;border:1px solid #e0e0e0;color:#bdbdbd;cursor:not-allowed;opacity:1}verdocs-signing-progress .btn.start,verdocs-signing-progress .btn.submit,verdocs-signing-progress .btn.next{background-color:var(--verdocs-primary-color, #55bc81);color:white}verdocs-signing-progress .btn.start:hover:not(:disabled),verdocs-signing-progress .btn.submit:hover:not(:disabled),verdocs-signing-progress .btn.next:hover:not(:disabled){background-color:var(--verdocs-primary-color-hover, #2b995b)}verdocs-signing-progress .btn.start:disabled,verdocs-signing-progress .btn.submit:disabled,verdocs-signing-progress .btn.next:disabled{background-color:#f0f0f0;border:1px solid #e0e0e0;color:#bdbdbd;cursor:not-allowed;opacity:1}verdocs-signing-progress .btn.prev,verdocs-signing-progress .btn.previous{background-color:#f3f4f6;color:#374151}verdocs-signing-progress .btn.prev:hover:not(:disabled),verdocs-signing-progress .btn.previous:hover:not(:disabled){background-color:#e5e7eb}verdocs-signing-progress .btn.prev:disabled,verdocs-signing-progress .btn.previous:disabled{background-color:#f0f0f0;border:1px solid #e0e0e0;color:#bdbdbd;cursor:not-allowed;opacity:1}verdocs-signing-progress .nav-buttons{display:-ms-flexbox;display:flex;gap:12px;width:100%}verdocs-signing-progress .nav-buttons .btn{-ms-flex:1;flex:1}";

const VerdocsSigningProgress = /*@__PURE__*/ proxyCustomElement(class VerdocsSigningProgress extends H {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
        this.started = createEvent(this, "started");
        this.next = createEvent(this, "next");
        this.previous = createEvent(this, "previous");
        this.exit = createEvent(this, "exit");
        /**
         * Current field index (1-based)
         */
        this.current = 0;
        /**
         * Total number of fields
         */
        this.total = 0;
        /**
         * Display mode
         */
        this.mode = 'start';
        /**
         * Label to display for the current field
         */
        this.fieldLabel = '';
        /**
         * Whether the current field has been completed (shows success message)
         */
        this.fieldCompleted = false;
    }
    renderSuccessIcon() {
        return (h("svg", { width: "24", height: "24", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3ZM13.3584 7.64645C13.532 7.82001 13.5513 8.08944 13.4163 8.28431L13.3584 8.35355L9.35355 12.3584C9.17999 12.532 8.91056 12.5513 8.71569 12.4163L8.64645 12.3584L6.64645 10.3584C6.45118 10.1632 6.45118 9.84658 6.64645 9.65131C6.82001 9.47775 7.08944 9.45846 7.28431 9.59346L7.35355 9.65131L9 11.298L12.6513 7.64645C12.8466 7.45118 13.1632 7.45118 13.3584 7.64645Z", fill: "#107C10" })));
    }
    renderContent() {
        if (this.mode === 'start') {
            return h("div", { class: "field-label" }, this.fieldLabel);
        }
        if (this.fieldCompleted) {
            return (h("div", { class: "field-completed" }, h("div", { class: "icon" }, this.renderSuccessIcon()), h("span", { class: "text" }, "Successfully signed!")));
        }
        return h("div", { class: "field-label" }, this.fieldLabel);
    }
    renderFooter() {
        if (this.mode === 'start') {
            return (h("button", { class: "btn start", onClick: () => this.started.emit() }, "Start"));
        }
        return (h("div", { class: "nav-buttons" }, h("button", { class: "btn previous", disabled: this.current <= 1, onClick: () => this.previous.emit() }, "Previous"), h("button", { class: "btn next", disabled: this.current >= this.total, onClick: () => this.next.emit() }, "Next")));
    }
    renderCompleted() {
        return (h("div", { class: "card completed" }, h("div", { class: "header-completed" }, h("div", { class: "icon" }, this.renderSuccessIcon()), "Completed"), h("div", { class: "description" }, "You have entered all requested signatures. Select Submit to complete the signing process."), h("div", { class: "separator" }), h("button", { class: "btn submit", onClick: () => this.exit.emit() }, "Submit")));
    }
    render() {
        if (this.mode === 'completed') {
            return this.renderCompleted();
        }
        return (h("div", { class: "card" }, h("div", { class: "header" }, this.current, " of ", this.total, " fields"), h("div", { class: "body" }, this.renderContent()), h("div", { class: "separator" }), this.renderFooter()));
    }
    static get style() { return verdocsSigningProgressCss; }
}, [256, "verdocs-signing-progress", {
        "current": [2],
        "total": [2],
        "mode": [1],
        "fieldLabel": [1, "field-label"],
        "fieldCompleted": [4, "field-completed"]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["verdocs-signing-progress"];
    components.forEach(tagName => { switch (tagName) {
        case "verdocs-signing-progress":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, VerdocsSigningProgress);
            }
            break;
    } });
}

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

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