import { h } from "@stencil/core";
export class DeleteConfirmationModal {
    constructor() {
        this.show = false;
        this.dialogTitle = "Confirm Delete";
        this.message = "Are you sure you want to delete this chat? This action cannot be undone.";
        this.confirmButtonText = "Delete";
        this.cancelButtonText = "Cancel";
    }
    handleConfirm() {
        this.confirmDelete.emit();
    }
    handleCancel() {
        this.cancelDelete.emit();
    }
    handleKeyDown(event) {
        if (event.key === "Escape") {
            event.preventDefault();
            this.handleCancel();
        }
    }
    render() {
        if (!this.show) {
            return null;
        }
        return (h("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": "delete-dialog-title", "aria-describedby": "delete-dialog-desc", class: "modal-backdrop", onClick: () => this.handleCancel(), onKeyDown: event => this.handleKeyDown(event) }, h("div", { class: "modal-content", role: "document", tabIndex: -1, onClick: (e) => e.stopPropagation() }, h("h2", { id: "delete-dialog-title" }, this.dialogTitle), h("p", { id: "delete-dialog-desc" }, this.message), h("div", { class: "modal-buttons" }, h("button", { onClick: () => this.handleConfirm(), autoFocus: true, class: "delete-button" }, this.confirmButtonText), h("button", { onClick: () => this.handleCancel(), class: "cancel-button" }, this.cancelButtonText)))));
    }
    static get is() { return "delete-confirmation-modal"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["delete-confirmation-modal.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["delete-confirmation-modal.css"]
        };
    }
    static get properties() {
        return {
            "show": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "show",
                "defaultValue": "false"
            },
            "dialogTitle": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "dialog-title",
                "defaultValue": "\"Confirm Delete\""
            },
            "message": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "message",
                "defaultValue": "\"Are you sure you want to delete this chat? This action cannot be undone.\""
            },
            "confirmButtonText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "confirm-button-text",
                "defaultValue": "\"Delete\""
            },
            "cancelButtonText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "cancel-button-text",
                "defaultValue": "\"Cancel\""
            }
        };
    }
    static get events() {
        return [{
                "method": "confirmDelete",
                "name": "confirmDelete",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "complexType": {
                    "original": "void",
                    "resolved": "void",
                    "references": {}
                }
            }, {
                "method": "cancelDelete",
                "name": "cancelDelete",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "complexType": {
                    "original": "void",
                    "resolved": "void",
                    "references": {}
                }
            }];
    }
}
