import { ToolbarBorder } from '../../enums/toolbar-border.enum';
export class EdelToolbarComponent {
    constructor() {
        this.border = ToolbarBorder.default;
        this.noGrid = false;
        this.background = false;
        this.center = false;
        this.useRadius = false;
        this.spaced = false;
        this.sticky = false;
        this.fixed = false;
        this.stickyBg = false;
        this.toolbarSettingsPage = false;
    }
    render() {
        return h("slot", null);
    }
    hostData() {
        return {
            class: 'toolbar'
        };
    }
    componentDidLoad() {
        this.updateClasses();
    }
    updateClasses() {
        this.resetClasses();
        if (this.border === ToolbarBorder.bottom)
            this.host.classList.add('toolbar--border-bottom');
        if (this.border === ToolbarBorder.top)
            this.host.classList.add('toolbar--border-top');
        if (!this.noGrid)
            this.host.classList.add('toolbar--grid');
        if (this.background)
            this.host.classList.add('toolbar--background');
        if (this.center)
            this.host.classList.add('toolbar--center');
        if (this.useRadius) {
            this.host.classList.add('toolbar--background');
            this.host.classList.add('toolbar--radius');
        }
        if (this.spaced) {
            this.host.classList.add('toolbar--spaced');
        }
        if (this.sticky)
            this.host.classList.add('toolbar--sticky');
        if (this.fixed)
            this.host.classList.add('toolbar--fixed');
        if (this.stickyBg)
            this.host.classList.add('toolbar--sticky-background');
        if (this.toolbarSettingsPage)
            this.host.classList.add('toolbar', 'toolbar--grid', 'toolbar--sticky', 'toolbar--fixed', 'toolbar--border-bottom', 'toolbar--sticky-background');
    }
    resetClasses() {
        this.host.classList.remove('toolbar--border-bottom');
        this.host.classList.remove('toolbar--border-top');
        this.host.classList.remove('toolbar--border-bottom');
        this.host.classList.remove('toolbar--border-top');
        this.host.classList.remove('toolbar--grid');
        this.host.classList.remove('toolbar--background');
        this.host.classList.remove('toolbar--center');
        this.host.classList.remove('toolbar--radius');
        this.host.classList.remove('toolbar--spaced');
        this.host.classList.remove('toolbar--sticky');
        this.host.classList.remove('toolbar--fixed');
        this.host.classList.remove('toolbar--sticky-background');
    }
    static get is() { return "edel-toolbar"; }
    static get properties() { return {
        "background": {
            "type": Boolean,
            "attr": "background",
            "watchCallbacks": ["componentDidLoad"]
        },
        "border": {
            "type": String,
            "attr": "border",
            "watchCallbacks": ["componentDidLoad"]
        },
        "center": {
            "type": Boolean,
            "attr": "center",
            "watchCallbacks": ["componentDidLoad"]
        },
        "fixed": {
            "type": Boolean,
            "attr": "fixed",
            "watchCallbacks": ["componentDidLoad"]
        },
        "host": {
            "elementRef": true
        },
        "noGrid": {
            "type": Boolean,
            "attr": "no-grid",
            "watchCallbacks": ["componentDidLoad"]
        },
        "spaced": {
            "type": Boolean,
            "attr": "spaced",
            "watchCallbacks": ["componentDidLoad"]
        },
        "sticky": {
            "type": Boolean,
            "attr": "sticky",
            "watchCallbacks": ["componentDidLoad"]
        },
        "stickyBg": {
            "type": Boolean,
            "attr": "sticky-bg",
            "watchCallbacks": ["componentDidLoad"]
        },
        "toolbarSettingsPage": {
            "type": Boolean,
            "attr": "toolbar-settings-page",
            "watchCallbacks": ["componentDidLoad"]
        },
        "useRadius": {
            "type": Boolean,
            "attr": "use-radius",
            "watchCallbacks": ["componentDidLoad"]
        }
    }; }
}
