/**
 * scaffold-ui-primitives/types.ts — Input contract + generated file shape.
 *
 * Today only EntityLookup is emitted; the schema stays narrow so adding new
 * primitives (EnumSelect, DateInput) means extending GeneratedFile output only.
 */
import { z } from 'zod';

export const ScaffoldUiPrimitivesInputSchema = z.object({
  projectPath: z.string().min(1),
  appCode: z.string().min(1),
  force: z.boolean().default(false),
});

export type ScaffoldUiPrimitivesInput = z.infer<typeof ScaffoldUiPrimitivesInputSchema>;

export interface GeneratedFile {
  path: string;
  content: string;
  /**
   * 'overwrite' — replace the file verbatim (used for the primitive .tsx).
   * 'deep-merge-json' — read existing JSON, merge `content` (parsed) on top
   *  preserving sibling keys (used for locale files so we don't clobber other
   *  namespaces like `auth.*` or `nav.*`).
   */
  strategy: 'overwrite' | 'deep-merge-json';
}
