// pg-data.jsx — All data for Prompt Gallery

const MODELS = [
  { id: 'all', name: 'Hammasi', abbr: '✦', slug: 'hammasi', color: '#0891b2', url: null, tryLabel: null },
  { id: 'chatgpt', name: 'ChatGPT', abbr: 'GP', slug: 'chatgpt', color: '#10a37f', url: 'https://chat.openai.com/?q=', tryLabel: "ChatGPT'da sinash" },
  { id: 'claude', name: 'Claude', abbr: 'CL', slug: 'claude', color: '#d97757', url: 'https://claude.ai/new?q=', tryLabel: "Claude'da ishlatish" },
  { id: 'gemini', name: 'Gemini', abbr: 'Gm', slug: 'gemini', color: '#4285f4', url: 'https://gemini.google.com/?q=', tryLabel: "Gemini'ga yuborish" },
  { id: 'midjourney', name: 'Midjourney', abbr: 'MJ', slug: 'midjourney', color: '#1a1a2e', url: 'https://www.midjourney.com/', tryLabel: "Midjourney'da sinash" },
  { id: 'dalle', name: 'DALL·E', abbr: 'DE', slug: 'dall-e', color: '#10a37f', url: 'https://labs.openai.com/', tryLabel: "DALL·E'da sinash" },
  { id: 'stable-diffusion', name: 'Stable Diffusion', abbr: 'SD', slug: 'stable-diffusion', color: '#a855f7', url: 'https://stability.ai/', tryLabel: "SD'da sinash" },
  { id: 'copilot', name: 'Copilot', abbr: 'Co', slug: 'copilot', color: '#0078d4', url: 'https://copilot.microsoft.com/', tryLabel: "Copilot'da sinash" },
  { id: 'perplexity', name: 'Perplexity', abbr: 'Px', slug: 'perplexity', color: '#20808d', url: 'https://www.perplexity.ai/search?q=', tryLabel: "Perplexity'da sinash" },
  { id: 'llama', name: 'Llama', abbr: 'Lm', slug: 'llama', color: '#0668e1', url: 'https://llama.meta.com/', tryLabel: "Llama'da sinash" },
  { id: 'mistral', name: 'Mistral', abbr: 'Ms', slug: 'mistral', color: '#f97316', url: 'https://chat.mistral.ai/', tryLabel: "Mistral'da sinash" },
  { id: 'grok', name: 'Grok', abbr: 'Gk', slug: 'grok', color: '#111', url: 'https://grok.x.ai/', tryLabel: "Grok'da sinash" },
];

const CATEGORIES = [
  { id: 'all', name: 'Hammasi', icon: '✨', slug: 'hammasi', color: '#0891b2', bg: '#ecfeff' },
  { id: 'marketing', name: 'Marketing', icon: '📣', slug: 'marketing', color: '#e11d48', bg: '#fff1f2' },
  { id: 'dasturlash', name: 'Dasturlash', icon: '💻', slug: 'dasturlash', color: '#7c3aed', bg: '#f5f3ff' },
  { id: 'kontent', name: 'Kontent yozish', icon: '✍️', slug: 'kontent-yozish', color: '#db2777', bg: '#fdf2f8' },
  { id: 'biznes', name: 'Biznes', icon: '💼', slug: 'biznes', color: '#d97706', bg: '#fffbeb' },
  { id: 'talim', name: "Ta'lim", icon: '🎓', slug: 'talim', color: '#9333ea', bg: '#faf5ff' },
  { id: 'dizayn', name: 'Dizayn', icon: '🎨', slug: 'dizayn', color: '#0891b2', bg: '#ecfeff' },
  { id: 'seo', name: 'SEO', icon: '🚀', slug: 'seo', color: '#059669', bg: '#ecfdf5' },
  { id: 'ijtimoiy', name: 'Ijtimoiy tarmoqlar', icon: '📱', slug: 'ijtimoiy-tarmoqlar', color: '#2563eb', bg: '#eff6ff' },
  { id: 'moliya', name: 'Moliya', icon: '💰', slug: 'moliya', color: '#ca8a04', bg: '#fefce8' },
  { id: 'sogliq', name: "Sog'liqni saqlash", icon: '🏥', slug: 'sogliq', color: '#dc2626', bg: '#fef2f2' },
  { id: 'huquq', name: 'Huquq', icon: '⚖️', slug: 'huquq', color: '#57534e', bg: '#fafaf9' },
  { id: 'hr', name: 'HR va ishga yollash', icon: '🤝', slug: 'hr', color: '#0d9488', bg: '#f0fdfa' },
  { id: 'mahsulot', name: 'Mahsulot boshqaruvi', icon: '📦', slug: 'mahsulot-boshqaruvi', color: '#7c3aed', bg: '#f5f3ff' },
  { id: 'tahlil', name: "Ma'lumotlar tahlili", icon: '📊', slug: 'malumotlar-tahlili', color: '#0284c7', bg: '#f0f9ff' },
  { id: 'mijoz', name: 'Mijozlarga xizmat', icon: '🎧', slug: 'mijozlarga-xizmat', color: '#ea580c', bg: '#fff7ed' },
  { id: 'shaxsiy', name: 'Shaxsiy rivojlanish', icon: '🌱', slug: 'shaxsiy-rivojlanish', color: '#65a30d', bg: '#f7fee7' },
  { id: 'tarjima', name: 'Tarjima', icon: '🌐', slug: 'tarjima', color: '#4f46e5', bg: '#eef2ff' },
  { id: 'ilmiy', name: 'Ilmiy tadqiqot', icon: '🔬', slug: 'ilmiy-tadqiqot', color: '#0e7490', bg: '#ecfeff' },
  { id: 'startap', name: 'Startaplar', icon: '💡', slug: 'startaplar', color: '#be123c', bg: '#fff1f2' },
];

const PROMPTS = [
  {
    id: 1,
    title: "Marketing strategiya generatori",
    description: "Mahsulot yoki xizmat uchun to'liq marketing strategiyasini yaratadi",
    prompt: "Act as a senior marketing strategist. I will give you a product or service, and you will create a comprehensive go-to-market strategy including target audience analysis, positioning statement, channel strategy, content calendar for 3 months, KPI framework, and budget allocation recommendations. Start by asking me about my product/service, current budget, and target market.",
    modelId: "chatgpt", categoryId: "marketing"
  },
  {
    id: 2,
    title: "Kod tekshiruvchi va optimizator",
    description: "Kodni tahlil qilib, xatolarni topadi va optimallashtirishni taklif etadi",
    prompt: "You are an expert code reviewer. I will paste code and you will: 1) Identify bugs and security vulnerabilities, 2) Suggest performance optimizations, 3) Check for best practices and design patterns, 4) Rate code quality 1-10 with specific reasoning, 5) Provide the refactored version with comments explaining each change. Be thorough but constructive.",
    modelId: "claude", categoryId: "dasturlash"
  },
  {
    id: 3,
    title: "SEO kontent yozuvchi",
    description: "SEO optimallashtirilgan professional maqolalar yaratadi",
    prompt: "Act as an SEO content specialist. Write a comprehensive, SEO-optimized article on [TOPIC]. Include: a compelling H1 title with primary keyword, meta description (155 chars), proper H2/H3 structure, naturally placed keywords (primary + 3 LSI keywords), internal linking suggestions, a FAQ section with schema-ready Q&As, and a call-to-action conclusion. Target word count: 1500-2000 words. Tone: professional yet conversational.",
    modelId: "claude", categoryId: "seo"
  },
  {
    id: 4,
    title: "Instagram kontent rejasi",
    description: "30 kunlik Instagram kontent strategiyasini yaratib beradi",
    prompt: "Act as a social media strategist specialized in Instagram growth. Create a 30-day content calendar for my [NICHE] business. For each day include: 1) Content type (Reel/Carousel/Story/Static), 2) Topic and hook, 3) Caption with relevant hashtags (20-30), 4) Best posting time, 5) CTA strategy. Also provide a weekly theme structure and engagement tactics. Format as a clear table.",
    modelId: "chatgpt", categoryId: "ijtimoiy"
  },
  {
    id: 5,
    title: "Biznes-plan tuzish yordamchisi",
    description: "Professional darajadagi biznes-plan tayyorlashda yordam beradi",
    prompt: "Act as a business plan consultant with 15 years of experience. Help me create a professional business plan for [BUSINESS IDEA]. Include: 1) Executive Summary, 2) Company Description, 3) Market Analysis with TAM/SAM/SOM, 4) Organization Structure, 5) Product/Service Line, 6) Marketing & Sales Strategy, 7) Financial Projections (3-year), 8) Funding Requirements. Ask me questions first to understand my business.",
    modelId: "gemini", categoryId: "biznes"
  },
  {
    id: 6,
    title: "UI/UX dizayn konsultanti",
    description: "Foydalanuvchi interfeysini tahlil qilib, yaxshilash maslahatini beradi",
    prompt: "You are a senior UI/UX designer with expertise in human-centered design. I will describe my app/website and you will: 1) Evaluate the current user flow and identify friction points, 2) Suggest UX improvements based on Nielsen's heuristics, 3) Recommend UI design patterns that increase conversion, 4) Create a detailed wireframe description for key screens, 5) Suggest micro-interactions that enhance usability. Ask about my product first.",
    modelId: "claude", categoryId: "dizayn"
  },
  {
    id: 7,
    title: "O'quv dasturi yaratuvchi",
    description: "Har qanday mavzu bo'yicha tizimli o'quv dasturini tuzadi",
    prompt: "Act as an instructional designer. Create a comprehensive 8-week learning curriculum for [TOPIC]. For each week include: 1) Learning objectives (using Bloom's taxonomy), 2) Key concepts and theory, 3) Practical exercises and projects, 4) Assessment criteria, 5) Recommended resources. Include a pre-assessment quiz and a final capstone project. Adapt difficulty progressively from beginner to intermediate.",
    modelId: "chatgpt", categoryId: "talim"
  },
  {
    id: 8,
    title: "Moliyaviy tahlil yordamchisi",
    description: "Moliyaviy ma'lumotlarni tahlil qilib, hisobot tayyorlaydi",
    prompt: "You are a financial analyst with CFA certification. I will provide financial data and you will: 1) Calculate key financial ratios (liquidity, profitability, leverage, efficiency), 2) Perform trend analysis, 3) Compare against industry benchmarks, 4) Identify financial strengths and weaknesses, 5) Create a clear executive summary with actionable recommendations, 6) Present data in organized tables. Be precise with numbers.",
    modelId: "gemini", categoryId: "moliya"
  },
  {
    id: 9,
    title: "HR intervyu savollari generatori",
    description: "Lavozimga mos intervyu savollari va baholash mezonlarini yaratadi",
    prompt: "Act as a senior HR recruiter. Generate a comprehensive interview question set for [POSITION] role. Include: 1) 5 behavioral questions (STAR method), 2) 5 technical/skill-based questions, 3) 3 situational judgment questions, 4) 2 culture-fit questions, 5) Scoring rubric (1-5) for each question with ideal answer indicators. Also include red flags to watch for and follow-up probing questions.",
    modelId: "chatgpt", categoryId: "hr"
  },
  {
    id: 10,
    title: "Mahsulot tavsifi yozuvchi",
    description: "Sotuvni oshiradigan professional mahsulot tavsiflari yaratadi",
    prompt: "You are an expert e-commerce copywriter. Write compelling product descriptions for [PRODUCT]. Create 3 versions: 1) Short (50 words) for product cards, 2) Medium (150 words) for category pages, 3) Long (300+ words) for product detail pages. Each must include: emotional triggers, benefit-focused language, sensory words, social proof placeholders, and a strong CTA. Optimize for SEO with natural keyword placement.",
    modelId: "claude", categoryId: "kontent"
  },
  {
    id: 11,
    title: "Python loyiha mentori",
    description: "Python dasturlash bo'yicha qadamma-qadam yo'riqnoma beradi",
    prompt: "You are a senior Python developer and mentor. I'm building [PROJECT]. Guide me step by step: 1) Project architecture and folder structure, 2) Required libraries and setup, 3) Database schema design, 4) Core functionality implementation with clean code, 5) Error handling and logging, 6) Testing strategy (unit + integration), 7) Deployment guide. Write production-ready code with docstrings and type hints.",
    modelId: "chatgpt", categoryId: "dasturlash"
  },
  {
    id: 12,
    title: "Huquqiy hujjat tahlilchisi",
    description: "Shartnomalar va huquqiy hujjatlarni tahlil qilib beradi",
    prompt: "Act as a legal document analyst. I will provide a contract/legal document and you will: 1) Summarize key terms and obligations in plain language, 2) Identify potentially unfavorable clauses, 3) Highlight missing standard protections, 4) Flag ambiguous language that could cause disputes, 5) Suggest specific amendments with reasoning, 6) Rate overall risk level (Low/Medium/High). Use clear section-by-section analysis.",
    modelId: "claude", categoryId: "huquq"
  },
  {
    id: 13,
    title: "Email marketing kampaniyasi",
    description: "Samarali email marketing kampaniyalarini rejalashtiradi va yozadi",
    prompt: "Act as an email marketing specialist. Design a complete 7-email drip campaign for [PRODUCT/SERVICE]. For each email provide: 1) Subject line (A/B versions), 2) Preview text, 3) Email body copy with personalization tokens, 4) CTA button text and placement, 5) Send timing and day, 6) Segment targeting criteria. Include welcome, nurture, social proof, objection handling, urgency, and conversion emails.",
    modelId: "gemini", categoryId: "marketing"
  },
  {
    id: 14,
    title: "SQL va bazalar optimizatori",
    description: "Ma'lumotlar bazasi va SQL so'rovlarini tezlashtirishda yordam beradi",
    prompt: "You are a database performance engineer. I will share my database schema and slow queries. You will: 1) Analyze query execution plans, 2) Suggest optimal indexing strategies, 3) Rewrite queries for better performance, 4) Recommend schema normalization/denormalization where appropriate, 5) Suggest caching strategies, 6) Provide estimated performance improvement percentages. Include before/after comparisons.",
    modelId: "claude", categoryId: "tahlil"
  },
  {
    id: 15,
    title: "Mijozlar bilan muloqot skripti",
    description: "Turli vaziyatlar uchun xizmat ko'rsatish skriptlarini yaratadi",
    prompt: "Act as a customer service trainer. Create professional response scripts for: 1) Angry customer with product complaint, 2) Refund request handling, 3) Technical support escalation, 4) Upselling during support call, 5) Handling negative reviews publicly. For each: provide opening, empathy statement, solution steps, closing, and follow-up template. Tone: professional, empathetic, solution-oriented.",
    modelId: "chatgpt", categoryId: "mijoz"
  },
  {
    id: 16,
    title: "90 kunlik rivojlanish rejasi",
    description: "Shaxsiy rivojlanish uchun tizimli 90 kunlik reja tuzadi",
    prompt: "Act as a personal development coach. Create a 90-day personal growth plan for someone wanting to improve in [AREA]. Structure into 3 phases (30 days each): Foundation, Growth, Mastery. For each phase include: 1) Daily habits and routines, 2) Weekly challenges, 3) Book/resource recommendations, 4) Journaling prompts, 5) Measurable milestones, 6) Accountability check-in questions. Make it actionable.",
    modelId: "gemini", categoryId: "shaxsiy"
  },
  {
    id: 17,
    title: "Ilmiy maqola strukturasi",
    description: "Ilmiy maqola va dissertatsiya tuzilmasini yaratadi",
    prompt: "You are an academic writing advisor. Help me structure a research paper on [TOPIC]. Provide: 1) Compelling title options (3 variations), 2) Abstract template (250 words), 3) Introduction with research gap identification, 4) Literature review framework, 5) Methodology section outline, 6) Results presentation strategy, 7) Discussion points structure, 8) Conclusion with implications. Include citation style guidance.",
    modelId: "claude", categoryId: "ilmiy"
  },
  {
    id: 18,
    title: "Startap pitch deck yaratuvchi",
    description: "Investorlar uchun professional pitch deck kontentini tayyorlaydi",
    prompt: "Act as a startup pitch deck consultant who has helped raise $500M+ in funding. Create pitch deck content for [STARTUP IDEA]. Structure: 1) Problem (market pain data), 2) Solution (unique value proposition), 3) Market Size (TAM/SAM/SOM), 4) Business Model (revenue streams), 5) Traction (metrics framework), 6) Competition (positioning matrix), 7) Team, 8) Financial Ask, 9) Vision. Keep each slide to 3-4 bullets max.",
    modelId: "chatgpt", categoryId: "startap"
  },
  {
    id: 19,
    title: "Professional tarjima yordamchisi",
    description: "Kontekstga mos professional tarjima va lokalizatsiya qiladi",
    prompt: "You are a professional translator and localization expert. Translate the following text from [SOURCE_LANG] to [TARGET_LANG]. Rules: 1) Maintain original tone and register, 2) Adapt cultural references appropriately, 3) Keep technical terminology accurate, 4) Preserve formatting and structure, 5) Provide alternative translations for ambiguous phrases, 6) Note any untranslatable concepts with explanations.",
    modelId: "gemini", categoryId: "tarjima"
  },
  {
    id: 20,
    title: "Brend vizual konsepsiyasi",
    description: "Brend uchun to'liq vizual identifikatsiya loyihasini yaratadi",
    prompt: "Create a complete brand identity concept for [BRAND_NAME], a [INDUSTRY] company. Generate: 1) Logo concept — modern, minimal, memorable mark that works at all sizes, clean geometric style, 2) Color palette — primary, secondary, accent colors with hex codes, 3) Typography pairing suggestion, 4) Brand pattern/texture, 5) Social media avatar version. Mood: [MOOD]. --ar 1:1 --style raw --v 6",
    modelId: "midjourney", categoryId: "dizayn"
  },
  {
    id: 21,
    title: "Sog'liq bo'yicha ma'lumot beruvchi",
    description: "Umumiy sog'liq va salomatlik haqida ilmiy asosda ma'lumot beradi",
    prompt: "Act as a health education assistant (not a doctor — always recommend professional medical consultation). For [HEALTH TOPIC]: 1) Explain the condition in simple terms, 2) List common symptoms and risk factors, 3) Describe evidence-based prevention strategies, 4) Suggest lifestyle modifications, 5) Explain when to seek professional help, 6) Provide reliable sources (WHO, NIH). Always include a medical disclaimer.",
    modelId: "chatgpt", categoryId: "sogliq"
  },
  {
    id: 22,
    title: "Mahsulot roadmap yaratuvchi",
    description: "6 oylik mahsulot rivojlantirish yo'l xaritasini tuzadi",
    prompt: "You are a senior product manager at a top tech company. Create a 6-month product roadmap for [PRODUCT]. Include: 1) Vision and strategic goals, 2) User persona summary, 3) Feature prioritization using RICE framework, 4) Sprint-level breakdown (2-week sprints), 5) Dependencies and risks, 6) Success metrics per milestone, 7) Stakeholder communication plan. Format as Now/Next/Later. Ask about the product first.",
    modelId: "claude", categoryId: "mahsulot"
  },
];

// Helper: get model/category objects by id
function getModel(id) { return MODELS.find(m => m.id === id); }
function getCategory(id) { return CATEGORIES.find(c => c.id === id); }

// Build try-URL for a model
function buildTryUrl(modelId, promptText) {
  const model = getModel(modelId);
  if (!model || !model.url) return null;
  const encoded = encodeURIComponent(promptText);
  if (['chatgpt','claude','gemini','perplexity'].includes(modelId)) {
    return model.url + encoded;
  }
  return model.url;
}

Object.assign(window, { MODELS, CATEGORIES, PROMPTS, getModel, getCategory, buildTryUrl });
