'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import { getTranslation } from '@payloadcms/translations';
import React from 'react';
import { ChevronIcon } from '../../../icons/Chevron/index.js';
import { useLocale } from '../../../providers/Locale/index.js';
import { useTranslation } from '../../../providers/Translation/index.js';
import './index.scss';
const baseClass = 'localizer-button';
export const LocalizerLabel = (props)=>{
    const { ariaLabel, className } = props;
    const locale = useLocale();
    const { i18n, t } = useTranslation();
    return /*#__PURE__*/ _jsxDEV("div", {
        "aria-label": ariaLabel || t('general:locale'),
        className: [
            baseClass,
            className
        ].filter(Boolean).join(' '),
        "data-locale": locale ? locale.code : undefined,
        children: [
            /*#__PURE__*/ _jsxDEV("div", {
                className: `${baseClass}__label`,
                children: [
                    `${t('general:locale')}:`,
                    " "
                ]
            }, void 0, true, {
                fileName: "src/elements/Localizer/LocalizerLabel/index.tsx",
                lineNumber: 26,
                columnNumber: 7
            }, this),
            /*#__PURE__*/ _jsxDEV("div", {
                className: `${baseClass}__current`,
                children: [
                    /*#__PURE__*/ _jsxDEV("span", {
                        className: `${baseClass}__current-label`,
                        children: `${getTranslation(locale.label, i18n)}`
                    }, void 0, false, {
                        fileName: "src/elements/Localizer/LocalizerLabel/index.tsx",
                        lineNumber: 28,
                        columnNumber: 9
                    }, this),
                    /*#__PURE__*/ _jsxDEV(ChevronIcon, {
                        className: `${baseClass}__chevron`
                    }, void 0, false, {
                        fileName: "src/elements/Localizer/LocalizerLabel/index.tsx",
                        lineNumber: 31,
                        columnNumber: 9
                    }, this)
                ]
            }, void 0, true, {
                fileName: "src/elements/Localizer/LocalizerLabel/index.tsx",
                lineNumber: 27,
                columnNumber: 7
            }, this)
        ]
    }, void 0, true, {
        fileName: "src/elements/Localizer/LocalizerLabel/index.tsx",
        lineNumber: 21,
        columnNumber: 5
    }, this);
};

//# sourceMappingURL=index.js.map