import { Breadcrumb } from "../Breadcrumb/index.mjs";
import { jsx } from "react/jsx-runtime";
import { camelCaseToSentence } from "@intlayer/config/client";

//#region src/components/DictionaryFieldEditor/KeyPathBreadcrumb.tsx
const KeyPathBreadcrumb = ({ keyPath, dictionaryKey, onClickKeyPath, locale, color, showDictionaryKey = true }) => {
	return /* @__PURE__ */ jsx(Breadcrumb, {
		links: [...showDictionaryKey ? [{
			text: camelCaseToSentence(dictionaryKey),
			onClick: onClickKeyPath ? () => onClickKeyPath([]) : void 0
		}] : [], ...keyPath.map((el, index) => ({
			onClick: onClickKeyPath ? () => onClickKeyPath?.(keyPath.slice(0, index + 1)) : void 0,
			text: el.key?.toString() ?? ""
		}))],
		locale,
		elementType: "location",
		color
	});
};

//#endregion
export { KeyPathBreadcrumb };
//# sourceMappingURL=KeyPathBreadcrumb.mjs.map