import { z } from "zod";
import {
  upsertDictionarySchema,
  createDictionaryEntrySchema,
  updateDictionaryEntrySchema,
  reorderDictionaryEntriesSchema,
  setDefaultDictionaryEntrySchema
} from "@open-mercato/core/modules/dictionaries/data/validators";
import { dictionaryEntrySortModeSchema } from "@open-mercato/core/modules/dictionaries/lib/entrySort";
const dictionariesTag = "Dictionaries";
const dictionariesErrorSchema = z.object({
  error: z.string()
}).passthrough();
const dictionariesOkSchema = z.object({
  ok: z.literal(true)
});
const dictionaryListQuerySchema = z.object({
  includeInactive: z.enum(["true", "false"]).optional()
});
const dictionarySchema = z.object({
  id: z.string().uuid(),
  key: z.string(),
  name: z.string(),
  description: z.string().nullable(),
  isSystem: z.boolean(),
  isActive: z.boolean(),
  managerVisibility: z.string().nullable().optional(),
  entrySortMode: dictionaryEntrySortModeSchema.optional(),
  organizationId: z.string().uuid().nullable(),
  isInherited: z.boolean().optional(),
  createdAt: z.string(),
  updatedAt: z.string().nullable()
});
const dictionaryListResponseSchema = z.object({
  items: z.array(dictionarySchema)
});
const dictionaryDetailSchema = dictionarySchema;
const dictionaryEntrySchema = z.object({
  id: z.string().uuid(),
  value: z.string(),
  label: z.string(),
  color: z.string().nullable(),
  icon: z.string().nullable(),
  position: z.number(),
  isDefault: z.boolean(),
  createdAt: z.string(),
  updatedAt: z.string().nullable()
});
const dictionaryEntryListResponseSchema = z.object({
  items: z.array(dictionaryEntrySchema)
});
const dictionaryEntryResponseSchema = dictionaryEntrySchema;
const dictionaryIdParamsSchema = z.object({
  dictionaryId: z.string().uuid()
});
const dictionaryEntryParamsSchema = z.object({
  dictionaryId: z.string().uuid(),
  entryId: z.string().uuid()
});
const dictionaryUpdateSchema = upsertDictionarySchema.partial();
const reorderEntriesRequestSchema = z.object({
  entries: z.array(z.object({
    id: z.string().uuid(),
    position: z.number().int().min(0)
  })).min(1)
});
const setDefaultEntryRequestSchema = z.object({
  entryId: z.string().uuid()
});
export {
  createDictionaryEntrySchema,
  dictionariesErrorSchema,
  dictionariesOkSchema,
  dictionariesTag,
  dictionaryDetailSchema,
  dictionaryEntryListResponseSchema,
  dictionaryEntryParamsSchema,
  dictionaryEntryResponseSchema,
  dictionaryEntrySchema,
  dictionaryIdParamsSchema,
  dictionaryListQuerySchema,
  dictionaryListResponseSchema,
  dictionarySchema,
  dictionaryUpdateSchema,
  reorderDictionaryEntriesSchema,
  reorderEntriesRequestSchema,
  setDefaultDictionaryEntrySchema,
  setDefaultEntryRequestSchema,
  updateDictionaryEntrySchema,
  upsertDictionarySchema
};
//# sourceMappingURL=openapi.js.map
