/*!
 * Crafted with ❤ by Salla
 */
import { h } from "@stencil/core";
/**
 * @slot The default slot.
 */
export class SallaTabContent {
    constructor() {
        this.isSelected = false;
    }
    /**
     * Expose self for the parent.
     */
    async getChild() {
        return {
            selected: this.selected.bind(this),
            unselect: this.unselect.bind(this),
            name: this.name
        };
    }
    unselect() {
        this.isSelected = false;
    }
    selected() {
        this.isSelected = true;
    }
    render() {
        const classes = {
            's-tabs-content': true,
            's-tabs-content-selected': this.isSelected
        };
        return (h("div", { key: '8678e860af6640f0ff1a92593fbe624416412b49', class: classes }, h("slot", { key: '10951e5230f9c5fbfbd5959d3773d44b66e85315' })));
    }
    static get is() { return "salla-tab-content"; }
    static get originalStyleUrls() {
        return {
            "$": ["salla-tab-content.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["salla-tab-content.css"]
        };
    }
    static get properties() {
        return {
            "name": {
                "type": "string",
                "attribute": "name",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Set name of the tab content. Mainly used as a key to s\nynchronize the content with it's respective header."
                },
                "getter": false,
                "setter": false,
                "reflect": false
            }
        };
    }
    static get states() {
        return {
            "isSelected": {}
        };
    }
    static get methods() {
        return {
            "getChild": {
                "complexType": {
                    "signature": "() => Promise<{ selected: any; unselect: any; name: string; }>",
                    "parameters": [],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        }
                    },
                    "return": "Promise<{ selected: any; unselect: any; name: string; }>"
                },
                "docs": {
                    "text": "Expose self for the parent.",
                    "tags": []
                }
            }
        };
    }
}
