import { useIntlayer } from "react-intlayer";
import { z } from "zod/v4";

//#region src/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.ts
const useDictionarySchema = (projectId) => {
	const { requiredErrorName, invalidTypeErrorName, requiredErrorProjectId, invalidTypeErrorProjectId } = useIntlayer("dictionary-form-schema");
	return z.object({
		key: z.string({ error: (issue) => issue.input === void 0 ? requiredErrorName.value : invalidTypeErrorName.value }).min(1, { error: invalidTypeErrorName.value }).default(""),
		projectIds: z.array(z.string({ error: (issue) => issue.input === void 0 ? requiredErrorProjectId.value : invalidTypeErrorProjectId.value })).default([projectId])
	});
};

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