import { ToolConfig } from './types';

export const tools: ToolConfig[] = [
  {
    slug: 'logframe',
    name: 'Logframe Generator',
    description: 'Generate professional logical framework matrices for grant applications in minutes.',
    icon: '📊',
    fields: [
      { name: 'project_title', label: 'Project Title', type: 'text', required: true, placeholder: 'e.g. Clean Water Access Programme' },
      { name: 'organisation', label: 'Organisation', type: 'text', required: true, placeholder: 'e.g. WaterAid' },
      { name: 'sector', label: 'Sector', type: 'select', required: true, options: ['Health', 'Education', 'WASH', 'Livelihoods', 'Protection', 'Food Security', 'Climate', 'Governance', 'Other'] },
      { name: 'beneficiaries', label: 'Target Beneficiaries', type: 'textarea', required: true, placeholder: 'Describe who benefits and estimated numbers' },
      { name: 'location', label: 'Geographic Location', type: 'text', required: true, placeholder: 'e.g. Rural Kenya, Kakamega County' },
      { name: 'duration', label: 'Project Duration', type: 'text', required: true, placeholder: 'e.g. 24 months' },
      { name: 'budget', label: 'Budget Range', type: 'text', placeholder: 'e.g. £500,000 - £750,000' },
      { name: 'summary', label: 'Project Summary', type: 'textarea', required: true, placeholder: 'Describe the project in 2-3 paragraphs' },
    ],
  },
  {
    slug: 'funder-rewriter',
    name: 'Funder Rewriter',
    description: 'Tailor your proposal language to match specific funders\' priorities and terminology.',
    icon: '✍️',
    fields: [
      { name: 'original_text', label: 'Original Proposal Text', type: 'textarea', required: true, placeholder: 'Paste your existing proposal text here' },
      { name: 'funder_name', label: 'Target Funder', type: 'text', required: true, placeholder: 'e.g. DFID, USAID, Gates Foundation' },
      { name: 'funder_type', label: 'Funder Type', type: 'select', required: true, options: ['Bilateral (Government)', 'Multilateral (UN/World Bank)', 'Foundation', 'Corporate', 'Trust', 'Other'] },
      { name: 'funder_priorities', label: 'Funder Priorities', type: 'textarea', required: true, placeholder: 'List the funder\'s key strategic priorities' },
      { name: 'grant_size', label: 'Grant Size', type: 'text', placeholder: 'e.g. £100,000 - £500,000' },
      { name: 'sector', label: 'Sector', type: 'text', required: true, placeholder: 'e.g. Health, Education' },
    ],
  },
  {
    slug: 'smart-indicators',
    name: 'SMART Indicators',
    description: 'Design comprehensive SMART indicator frameworks for M&E systems.',
    icon: '🎯',
    fields: [
      { name: 'project_title', label: 'Project/Programme Name', type: 'text', required: true, placeholder: 'e.g. Maternal Health Improvement Programme' },
      { name: 'sector', label: 'Sector', type: 'select', required: true, options: ['Health', 'Education', 'WASH', 'Livelihoods', 'Protection', 'Food Security', 'Climate', 'Governance', 'Other'] },
      { name: 'outcomes', label: 'Outcomes to Measure', type: 'textarea', required: true, placeholder: 'List the key outcomes you need indicators for' },
      { name: 'target_population', label: 'Target Population', type: 'textarea', required: true, placeholder: 'Who are you measuring change for?' },
      { name: 'timeframe', label: 'Timeframe', type: 'text', required: true, placeholder: 'e.g. 3 years' },
      { name: 'data_capacity', label: 'Data Collection Capacity', type: 'select', required: true, options: ['Basic (paper-based)', 'Moderate (some digital)', 'Advanced (full digital M&E system)'] },
    ],
  },
  {
    slug: 'theory-of-change',
    name: 'Theory of Change',
    description: 'Build compelling theories of change with clear causal pathways and evidence.',
    icon: '🔄',
    fields: [
      { name: 'project_title', label: 'Project/Organisation Name', type: 'text', required: true, placeholder: 'e.g. Youth Empowerment Initiative' },
      { name: 'mission', label: 'Mission Statement', type: 'textarea', required: true, placeholder: 'What is your organisation/project mission?' },
      { name: 'problem', label: 'Problem Statement', type: 'textarea', required: true, placeholder: 'What problem are you addressing? Include root causes.' },
      { name: 'target_population', label: 'Target Population', type: 'textarea', required: true, placeholder: 'Who are you trying to help?' },
      { name: 'context', label: 'Geographic/Social Context', type: 'textarea', required: true, placeholder: 'Describe the context in which you operate' },
      { name: 'timeframe', label: 'Timeframe', type: 'text', required: true, placeholder: 'e.g. 5 years' },
    ],
  },
];

export function getToolBySlug(slug: string): ToolConfig | undefined {
  return tools.find((t) => t.slug === slug);
}
