/**
 * scaffold-dashboard-primitives/types.ts — Input contract + generated file shape.
 *
 * Emits editable, theme-compliant dashboard primitives into the client app's
 * src/components/dashboard/ (the package's own KpiCard/ChartContainer/… are
 * INTERNAL and not exported, so — like scaffold-ui-primitives for form controls
 * — we scaffold local editable equivalents the developer owns).
 */
import { z } from 'zod';

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

export type ScaffoldDashboardPrimitivesInput = z.infer<typeof ScaffoldDashboardPrimitivesInputSchema>;

export interface GeneratedFile {
  path: string;
  content: string;
  /**
   * 'overwrite' — replace the file verbatim (the primitive .tsx/.ts).
   * 'deep-merge-json' — read existing JSON, merge `content` (parsed) on top,
   *  preserving sibling namespaces (used for the `dashboard.*` locale keys).
   */
  strategy: 'overwrite' | 'deep-merge-json';
}
