'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const core = require('./core-b7b9d752.js');

const ButtonClose = class {
    constructor(hostRef) {
        core.registerInstance(this, hostRef);
        /**
         * If true will render as a free button instead of the standard icon.
         */
        this.free = false;
        this.anjClose = core.createEvent(this, "anjClose", 7);
    }
    onClick() {
        if (this.context !== 'clear') {
            this.anjClose.emit();
        }
    }
    render() {
        return (core.h("anj-button", { context: this.free ? 'free' : 'icon', onClick: () => this.onClick(), ariaLabel: this.context === 'clear' ? 'Clear' : 'Close' }, core.h("svg", { slot: "icon-only", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }, core.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}"; }
};

exports.anj_button_close = ButtonClose;
