// Stencil
import { h } from "@stencil/core";
// Tools
import { MediaTool } from '../../../tools/media-tool';
export class ContentAnnouncement {
    constructor() {
        // Props
        this.name = '';
        this.image = [];
        this.iconName = '';
        this.contentTitle = '';
        this.description = '';
        this.buttonTitle = 'Read more';
    }
    ////////////////////////////////////////////////////////////////
    // User Interactions
    ////////////////////////////////////////////////////////////////
    /**
     * Click on the title
     */
    onClick() {
        this.openContentClicked.emit();
    }
    ////////////////////////////////////////////////////////////////
    // Render
    ////////////////////////////////////////////////////////////////
    render() {
        return (h("div", null,
            h("div", { class: 'main-container' },
                h("p", { class: 'header-text' }, this.name),
                h("div", { class: 'subcontainer', style: { backgroundImage: 'url(' + MediaTool.imageL(this.image) + ')' } },
                    h("div", { class: 'content-container' },
                        h("div", { class: 'text-container' },
                            h("p", { class: 'title' }, this.contentTitle),
                            h("p", { class: 'description' }, this.description)),
                        h("div", { class: 'button-container' },
                            h("ion-button", { color: 'dark', onClick: () => this.onClick() },
                                h("ion-icon", { name: "eye", color: "light", class: "find-icon" }),
                                this.buttonTitle)))))));
    }
    static get is() { return "content-announcement"; }
    static get originalStyleUrls() { return {
        "$": ["content-announcement.scss"]
    }; }
    static get styleUrls() { return {
        "$": ["content-announcement.css"]
    }; }
    static get properties() { return {
        "name": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "name",
            "reflect": false,
            "defaultValue": "''"
        },
        "image": {
            "type": "unknown",
            "mutable": false,
            "complexType": {
                "original": "MediaElement[]",
                "resolved": "MediaElement[]",
                "references": {
                    "MediaElement": {
                        "location": "import",
                        "path": "../../../models/media/media-model"
                    }
                }
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "defaultValue": "[]"
        },
        "iconName": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "icon-name",
            "reflect": false,
            "defaultValue": "''"
        },
        "contentTitle": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "content-title",
            "reflect": false,
            "defaultValue": "''"
        },
        "description": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "description",
            "reflect": false,
            "defaultValue": "''"
        },
        "buttonTitle": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "button-title",
            "reflect": false,
            "defaultValue": "'Read more'"
        }
    }; }
    static get events() { return [{
            "method": "openContentClicked",
            "name": "openContentClicked",
            "bubbles": true,
            "cancelable": true,
            "composed": true,
            "docs": {
                "tags": [],
                "text": ""
            },
            "complexType": {
                "original": "void",
                "resolved": "void",
                "references": {}
            }
        }]; }
}
