import { ACCESS_POINT_TYPES, KEEP_OUT_TYPES, MOVEMENT_POSITIONS, ASSEMBLY_TYPES } from '@/services/dimensionDefinitions';

export const ACCESS_POINT_FIELDS = [
  { key: 'name', label: 'Access point name', type: 'text' },
  { key: 'type', label: 'Type', type: 'select', options: ACCESS_POINT_TYPES },
  { key: 'position', label: 'Position relative to origin', type: 'text' },
  { key: 'width_mm', label: 'Width (mm)', type: 'number' },
  { key: 'height_mm', label: 'Height (mm)', type: 'number' },
  { key: 'depth_mm', label: 'Depth (mm)', type: 'number' },
  { key: 'required_clearance_mm', label: 'Required surrounding clearance (mm)', type: 'number' },
  { key: 'direction_of_access', label: 'Direction of access', type: 'text' },
  { key: 'opening_path', label: 'Opening / movement path', type: 'text' },
  { key: 'photograph_url', label: 'Photograph URL', type: 'text' },
  { key: 'must_remain_visible', label: 'Must remain visible', type: 'checkbox', checkLabel: 'Must remain visible' },
  { key: 'must_remain_accessible', label: 'Must remain physically accessible', type: 'checkbox', checkLabel: 'Must remain accessible' },
];

export const KEEP_OUT_FIELDS = [
  { key: 'name', label: 'Zone name', type: 'text' },
  { key: 'type', label: 'Type', type: 'select', options: KEEP_OUT_TYPES },
  { key: 'width_mm', label: 'Width (mm)', type: 'number' },
  { key: 'height_mm', label: 'Height (mm)', type: 'number' },
  { key: 'depth_mm', label: 'Depth (mm)', type: 'number' },
  { key: 'position', label: 'Position relative to origin', type: 'text' },
  { key: 'clearance_mm', label: 'Clearance (mm)', type: 'number' },
  { key: 'reason', label: 'Reason', type: 'text' },
];

export const MOVEMENT_FIELDS = [
  { key: 'position_name', label: 'Position', type: 'select', options: MOVEMENT_POSITIONS.map(p => p[0]) },
  { key: 'angle_degrees', label: 'Angle (degrees)', type: 'number' },
  { key: 'front_most_mm', label: 'Front-most point (mm)', type: 'number' },
  { key: 'rear_most_mm', label: 'Rear-most point (mm)', type: 'number' },
  { key: 'medial_most_mm', label: 'Medial-most point (mm)', type: 'number' },
  { key: 'lateral_most_mm', label: 'Lateral-most point (mm)', type: 'number' },
  { key: 'highest_point_mm', label: 'Highest moving point (mm)', type: 'number' },
  { key: 'lowest_point_mm', label: 'Lowest moving point (mm)', type: 'number' },
  { key: 'max_width_mm', label: 'Maximum width (mm)', type: 'number' },
  { key: 'max_depth_mm', label: 'Maximum depth (mm)', type: 'number' },
  { key: 'required_clearance_mm', label: 'Required added clearance (mm)', type: 'number' },
  { key: 'photograph_url', label: 'Photograph URL', type: 'text' },
  { key: 'scan_url', label: 'Scan URL (optional)', type: 'text' },
  { key: 'moving_parts', label: 'Parts that move', type: 'text' },
  { key: 'uncovered_parts', label: 'Parts that must remain uncovered', type: 'text' },
  { key: 'collision_notes', label: 'Collision notes', type: 'text' },
];

export const ASSEMBLY_FIELDS = [
  { key: 'component_label', label: 'Component label', type: 'text' },
  { key: 'position_in_assembly', label: 'Position in assembly', type: 'select', options: ASSEMBLY_TYPES },
  { key: 'orientation', label: 'Orientation', type: 'text' },
  { key: 'rotation_degrees', label: 'Rotation (degrees)', type: 'number' },
  { key: 'offset_mm', label: 'Offset (mm)', type: 'text' },
  { key: 'connection_above', label: 'Connection above', type: 'text' },
  { key: 'connection_below', label: 'Connection below', type: 'text' },
  { key: 'installed_visible_length_mm', label: 'Installed visible length (mm)', type: 'number' },
  { key: 'installed_hidden_length_mm', label: 'Installed hidden length (mm)', type: 'number' },
  { key: 'max_width_mm', label: 'Maximum width (mm)', type: 'number' },
  { key: 'max_depth_mm', label: 'Maximum depth (mm)', type: 'number' },
];