import type { ModelTreeItem } from './types'

export type DocumentTemplate = {
  id: string
  label: string
  version: number
  dirty: boolean
  readOnly: boolean
  units: string
  tree: ModelTreeItem[]
  selectedObjectIds: string[]
}

export const PUMP_HOUSING_DEMO_TEMPLATE: DocumentTemplate = {
  id: 'doc-pump-housing',
  label: 'Pump Housing',
  version: 18,
  dirty: true,
  readOnly: false,
  units: 'mm',
  selectedObjectIds: ['pad'],
  tree: [
    { id: 'origin', label: 'Origin', type: 'folder', children: ['XY_Plane', 'XZ_Plane', 'YZ_Plane'] },
    { id: 'body', label: 'Body', type: 'body', state: 'active', children: ['sketch', 'pad', 'pocket', 'fillet'] },
    { id: 'sketch', label: 'Sketch', type: 'sketch', state: 'valid', detail: 'Fully constrained' },
    { id: 'pad', label: 'Pad', type: 'feature', state: 'valid', detail: 'Length 42 mm' },
    { id: 'pocket', label: 'Pocket', type: 'feature', state: 'warning', detail: 'Through all' },
    { id: 'fillet', label: 'Fillet', type: 'feature', state: 'valid', detail: 'Radius 3 mm' },
    { id: 'reference', label: 'Reference geometry', type: 'folder', children: ['DatumPlane', 'DatumAxis'] },
  ],
}
