import { h } from "@stencil/core";
export class DgaTooltip {
    constructor() {
        this.beakPlacement = 'none';
        this.beakAlignment = 'center';
        this.direction = 'top';
        this.icon = false;
        this.theme = 'light';
        this.isHovered = false;
        this.icons = {
            'success-check': {
                icon: 'hgi-checkmark-circle-02',
                color: "#067647"
            },
            'blue-info': {
                icon: 'hgi-information-circle',
                color: "#175CD3"
            },
            'neutral-info': {
                icon: 'hgi-information-circle',
                color: "#384250"
            },
            'neutral-?': {
                icon: 'hgi-help-circle',
                color: "#384250"
            },
            'warning-!-circle': {
                icon: 'hgi-alert-circle',
                color: "#B54708"
            },
            'warning-!-triangle': {
                icon: 'hgi-sharp hgi-alert-02',
                color: "#B54708"
            },
            'error-!': {
                icon: 'hgi-alert-circle',
                color: "#B42318"
            },
            'error-x': {
                icon: 'hgi-cancel-circle',
                color: "#B42318"
            },
        };
        this.handleMouseEnter = () => {
            this.isHovered = true;
        };
        this.handleMouseLeave = () => {
            this.isHovered = false;
        };
    }
    render() {
        return (h("div", { key: 'f954e6fef0ddd3104af9daa6bba7514e57791b53', class: "dga-tooltip", "data-theme": this.theme, "data-beak-direction": `${this.beakPlacement}-${this.beakAlignment}` }, this.isHovered && (h("div", { key: '57a12c247234bb67a8bfceadb58990b49e6b5ad8', class: "dga-tooltip-main", "data-direction": this.direction }, h("div", { key: '6cc00a4edf888214dcc204a6f21f6531fc436189', class: "dga-tooltip-main__wrapper" }, this.beakPlacement !== 'none' && h("span", { key: '086ec89ad9f249c6b9ad8d4443480a6e44db9bcc', class: "dga-tooltip-main__beak", "data-beak-direction": `${this.beakPlacement}-${this.beakAlignment}` }), this.icon && h("span", { key: '6be374817017db4fcbd32bd4ce356bade9ee2d4a', class: "dga-tooltip-main__icon" }, h("i", { key: '6add6287bf4dc47bb8782b6b0cffecbc6e72cc52', class: `${this.feedbackIcon.style === 'icon-only' ? 'hgi-stroke' : 'hgi-solid'} ${this.icons[this.feedbackIcon.type].icon}`, style: { color: this.icons[this.feedbackIcon.type].color, fontSize: `${this.feedbackIcon.size}px` } })), h("div", { key: '1e6787ef280f3794eb9eab67930ab39aac5b3155', class: "dga-tooltip-main__content" }, this.tooltipTitle && h("span", { key: 'c82241a43fa876fe774e96a71fc0be9c09218f6b', class: "dga-tooltip-main__content__title" }, this.tooltipTitle), this.helperText && h("span", { key: 'ac6a390e50f5a1e9f04425c96de92c907d05f9ab', class: "dga-tooltip-main__content__helper-text" }, this.helperText))))), h("div", { key: 'c462863da6e04e22ca14b9558a5d28fe95a16d2c', class: "dga-tooltip-item", onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("slot", { key: 'a524c7133718327678f229881bdec179bb16e2db' }))));
    }
    static get is() { return "dga-tooltip"; }
    static get originalStyleUrls() {
        return {
            "$": ["dga-tooltip.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["dga-tooltip.css"]
        };
    }
    static get properties() {
        return {
            "beakPlacement": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "BeakPlacement",
                    "resolved": "\"bottom\" | \"left\" | \"none\" | \"right\" | \"top\"",
                    "references": {
                        "BeakPlacement": {
                            "location": "local",
                            "path": "/home/mamoud/Documents/temp/components/platform-code-cross-platform-storybook/packages/core/src/components/dga-tooltip/dga-tooltip.tsx",
                            "id": "src/components/dga-tooltip/dga-tooltip.tsx::BeakPlacement"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "beak-placement",
                "reflect": false,
                "defaultValue": "'none'"
            },
            "beakAlignment": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "BeakAlignment",
                    "resolved": "\"center\" | \"end\" | \"start\"",
                    "references": {
                        "BeakAlignment": {
                            "location": "local",
                            "path": "/home/mamoud/Documents/temp/components/platform-code-cross-platform-storybook/packages/core/src/components/dga-tooltip/dga-tooltip.tsx",
                            "id": "src/components/dga-tooltip/dga-tooltip.tsx::BeakAlignment"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "beak-alignment",
                "reflect": false,
                "defaultValue": "'center'"
            },
            "direction": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "Direction",
                    "resolved": "\"bottom\" | \"left\" | \"right\" | \"top\"",
                    "references": {
                        "Direction": {
                            "location": "local",
                            "path": "/home/mamoud/Documents/temp/components/platform-code-cross-platform-storybook/packages/core/src/components/dga-tooltip/dga-tooltip.tsx",
                            "id": "src/components/dga-tooltip/dga-tooltip.tsx::Direction"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "direction",
                "reflect": false,
                "defaultValue": "'top'"
            },
            "tooltipTitle": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "title",
                "reflect": false
            },
            "helperText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "helper-text",
                "reflect": false
            },
            "icon": {
                "type": "boolean",
                "mutable": true,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "icon",
                "reflect": true,
                "defaultValue": "false"
            },
            "feedbackIcon": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "FeedbackIcon",
                    "resolved": "FeedbackIcon",
                    "references": {
                        "FeedbackIcon": {
                            "location": "local",
                            "path": "/home/mamoud/Documents/temp/components/platform-code-cross-platform-storybook/packages/core/src/components/dga-tooltip/dga-tooltip.tsx",
                            "id": "src/components/dga-tooltip/dga-tooltip.tsx::FeedbackIcon"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false
            },
            "theme": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "Theme",
                    "resolved": "\"dark\" | \"light\"",
                    "references": {
                        "Theme": {
                            "location": "local",
                            "path": "/home/mamoud/Documents/temp/components/platform-code-cross-platform-storybook/packages/core/src/components/dga-tooltip/dga-tooltip.tsx",
                            "id": "src/components/dga-tooltip/dga-tooltip.tsx::Theme"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "theme",
                "reflect": false,
                "defaultValue": "'light'"
            }
        };
    }
    static get states() {
        return {
            "isHovered": {}
        };
    }
}
//# sourceMappingURL=dga-tooltip.js.map
