export interface PublicFlowTemplate {
  id: string
  name: string
  description: string | null
  category: string | null
  tree_type: string
  step_count: number
  usage_count: number
  success_rate: number | null
  tags: string[]
  preview_structure: Record<string, unknown> | null
  created_at: string
}

export interface PublicScriptTemplate {
  id: string
  name: string
  description: string | null
  category_name: string | null
  category_icon: string | null
  complexity: string | null
  tags: string[]
  parameter_count: number
  requires_elevation: boolean
  requires_modules: string[]
  usage_count: number
  is_verified: boolean
  created_at: string
}

export interface PublicGalleryResponse {
  flow_templates: PublicFlowTemplate[]
  script_templates: PublicScriptTemplate[]
  total_flows: number
  total_scripts: number
  categories: string[]
  domains: string[]
}

export type PublicFlowDetail = PublicFlowTemplate

export interface PublicScriptDetail {
  id: string
  name: string
  description: string | null
  category_name: string | null
  complexity: string | null
  tags: string[]
  parameters: Array<{ name: string; description: string; type: string }>
  requires_elevation: boolean
  requires_modules: string[]
  usage_count: number
  is_verified: boolean
  created_at: string
}

export interface GalleryCategory {
  name: string
  count: number
}
