// Extrudex domain types

export interface MaterialBase {
  id: number
  name: string
  density_g_cm3: number
  extrusion_temp_min?: number
  extrusion_temp_max?: number
  bed_temp_min?: number
  bed_temp_max?: number
  created_at: string
  updated_at: string
}

export interface MaterialFinish {
  id: number
  name: string
  description?: string
  created_at: string
  updated_at: string
}

export interface MaterialModifier {
  id: number
  name: string
  description?: string
  created_at: string
  updated_at: string
}

export interface FilamentSpool {
  id: number
  name: string
  material_base_id: number
  material_base?: MaterialBase
  material_finish_id: number
  material_finish?: MaterialFinish
  material_modifier_id?: number
  material_modifier?: MaterialModifier
  color_hex: string
  brand?: string
  diameter_mm: number
  initial_grams: number
  remaining_grams: number
  spool_weight_grams?: number
  cost_usd?: number
  low_stock_threshold_grams: number
  notes?: string
  barcode?: string
  deleted_at?: string
  created_at: string
  updated_at: string
}

export interface ListResponse<T> {
  data: T[]
  total: number
  limit: number
  offset: number
}

export interface FilamentFilter {
  material?: string
  finish?: string
  color?: string
  low_stock?: boolean
  search?: string
  sort_by?: string
  sort_dir?: 'asc' | 'desc'
  limit?: number
  offset?: number
}
