import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import { useModal } from '@faceless-ui/modal';
import { XIcon } from '../../icons/X/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import './index.scss';
const baseClass = 'close-modal-button';
export function CloseModalButton({ slug, className }) {
    const { closeModal } = useModal();
    const { t } = useTranslation();
    return /*#__PURE__*/ _jsxDEV("button", {
        "aria-label": t('general:close'),
        className: [
            baseClass,
            className
        ].filter(Boolean).join(' '),
        onClick: ()=>{
            closeModal(slug);
        },
        type: "button",
        children: /*#__PURE__*/ _jsxDEV(XIcon, {}, void 0, false, {
            fileName: "src/elements/CloseModalButton/index.tsx",
            lineNumber: 23,
            columnNumber: 7
        }, this)
    }, "close-button", false, {
        fileName: "src/elements/CloseModalButton/index.tsx",
        lineNumber: 14,
        columnNumber: 5
    }, this);
}

//# sourceMappingURL=index.js.map