import { h } from '../edel-elements.core.js';

class EdelMenuComponent {
    constructor() {
        this.uppercase = false;
        this.highlight = false;
        this.full = false;
        this.hasIcon = false;
        this.plain = false;
        this.isHeader = false;
    }
    render() {
        return h("slot", null);
    }
    hostData() {
        return {
            class: 'menu'
        };
    }
    componentDidLoad() {
        this.getClass();
    }
    getClass() {
        this.shouldHaveClass('menu--has-uppercase', this.uppercase);
        this.shouldHaveClass('menu--highlight', this.highlight);
        this.shouldHaveClass('menu--full', this.full);
        this.shouldHaveClass('menu--has-icon', this.hasIcon);
        this.shouldHaveClass('menu--plain', this.plain);
        this.shouldHaveClass('menu--is-header', this.isHeader);
    }
    shouldHaveClass(theme, should) {
        if (should) {
            this.hostElement.classList.add(theme);
        }
        else {
            this.hostElement.classList.remove(theme);
        }
    }
    static get is() { return "edel-menu"; }
    static get properties() { return {
        "full": {
            "type": Boolean,
            "attr": "full",
            "watchCallbacks": ["getClass"]
        },
        "hasIcon": {
            "type": Boolean,
            "attr": "has-icon",
            "watchCallbacks": ["getClass"]
        },
        "highlight": {
            "type": Boolean,
            "attr": "highlight",
            "watchCallbacks": ["getClass"]
        },
        "hostElement": {
            "elementRef": true
        },
        "isHeader": {
            "type": Boolean,
            "attr": "is-header",
            "watchCallbacks": ["getClass"]
        },
        "plain": {
            "type": Boolean,
            "attr": "plain",
            "watchCallbacks": ["getClass"]
        },
        "uppercase": {
            "type": Boolean,
            "attr": "uppercase",
            "watchCallbacks": ["getClass"]
        }
    }; }
}

export { EdelMenuComponent as EdelMenu };
