import { r as registerInstance, d as createEvent, h } from './core-34fac203.js';

const ButtonClose = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /**
         * If true will render as a free button instead of the standard icon.
         */
        this.free = false;
        this.anjClose = createEvent(this, "anjClose", 7);
    }
    onClick() {
        if (this.context !== 'clear') {
            this.anjClose.emit();
        }
    }
    render() {
        return (h("anj-button", { context: this.free ? 'free' : 'icon', onClick: () => this.onClick(), ariaLabel: this.context === 'clear' ? 'Clear' : 'Close' }, h("svg", { slot: "icon-only", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }, h("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }))));
    }
    static get style() { return ".sc-anj-button-close-h {\n  display: block;\n}\n[context=floating].sc-anj-button-close-h {\n  position: absolute;\n  right: 0.5rem;\n  top: 0.5rem;\n  z-index: 1;\n}"; }
};

export { ButtonClose as anj_button_close };
