import type { AppContent } from '$lib/types/content';

export const apps: AppContent[] = [
  {
    id: 'readme',
    icon: 'iO',
    title: 'README.first',
    shortTitle: 'Start Here',
    category: 'core',
    defaultSize: { width: 700, height: 560 },
    mobilePriority: 1,
    summary: 'Orientation and suggested routes through ianOS.',
    content: [
      { type: 'heading', text: 'README.first' },
      { type: 'paragraph', text: "Hi. I'm Ian Barrs." },
      { type: 'quote', text: 'I build simpler systems for people doing difficult work.' },
      {
        type: 'paragraph',
        text:
          'That usually means IT, security, compliance, operations, training, process, digital infrastructure, cost control, awkward problem-solving and translating between people who should probably have been in the same room six months earlier.'
      },
      {
        type: 'paragraph',
        text:
          'This site is built like a small operating system because a normal portfolio page felt too tidy for the truth. My work has always sat between categories: technical enough for infrastructure, human enough for training, cynical enough for compliance, creative enough for broadcasting, practical enough for small businesses, and stubborn enough for community work.'
      },
      {
        type: 'cards',
        cards: [
          { title: 'Recruiters', body: 'Open Profile, CV Core, Workbench and Evidence.' },
          { title: 'Clients', body: 'Open Workbench, everwished HQ, Ventures and Contact.' },
          { title: 'Charities', body: 'Open charIT, Responsibility by Design and Contact.' },
          { title: 'The nosy', body: 'Open Terminal, type help, and behave approximately.' }
        ]
      },
      { type: 'cta', label: 'Open printable CV', href: '/cv', note: 'Clean, boring in the useful way.' },
      { type: 'cta', label: 'Use Simple Mode', href: '/simple', note: 'Same substance, fewer moving parts.' }
    ]
  },
  {
    id: 'profile',
    icon: 'IB',
    title: 'Ian Barrs // profile.exe',
    shortTitle: 'Profile',
    category: 'core',
    defaultSize: { width: 760, height: 620 },
    mobilePriority: 2,
    summary: 'Professional profile, journey and collaboration context.',
    content: [
      { type: 'heading', text: 'Ian Barrs' },
      {
        type: 'paragraph',
        text:
          'Ian Barrs is an IT, security, compliance, operations and training specialist with more than two decades around technical and operational environments.'
      },
      {
        type: 'paragraph',
        text:
          'He works across the messy join between systems, people, risk, governance, cost and communication. The useful pattern is not one neat title. It is spotting where different teams are describing the same broken system from different angles.'
      },
      {
        type: 'quote',
        text:
          'My path has not been clean or tidy. ADHD and bipolar are part of the context, but they are not the point of the story. The point is what I learned: I am strongest with good people around me, clear constraints, honest challenge and a mission worth caring about.'
      },
      {
        type: 'cards',
        cards: [
          {
            title: 'Systems connector',
            body:
              'Joins up technology, process, evidence, cost, risk and the humans who have to live with the result.'
          },
          {
            title: 'Force multiplier',
            body:
              'At his best with good people around him, turning messy intent into usable systems and practical next steps.'
          },
          {
            title: 'Creative operator',
            body:
              'Training, broadcasting, writing, ventures and brand work are not side quests. They are communication infrastructure.'
          }
        ]
      },
      {
        type: 'paragraph',
        text:
          'The public story should feel candid, not confessional: lived consequences of messy systems turned into a stubborn interest in making better ones.'
      }
    ]
  },
  {
    id: 'cv',
    icon: 'CV',
    title: 'CV Core // selected history',
    shortTitle: 'CV Core',
    category: 'work',
    defaultSize: { width: 860, height: 700 },
    mobilePriority: 3,
    summary: 'Fulsome public CV narrative and capability summary.',
    content: [
      { type: 'heading', text: 'CV Core' },
      {
        type: 'paragraph',
        text:
          'A selected public CV, built around capability rather than pretending a varied career was secretly one straight corridor.'
      },
      {
        type: 'cards',
        cards: [
          {
            title: 'IT and infrastructure',
            body:
              'Technical operations, support models, infrastructure thinking, supplier reality and practical service improvement.'
          },
          {
            title: 'Security and risk',
            body:
              'Security awareness, control thinking, audit readiness, proportionate governance and evidence that survives contact with real work.'
          },
          {
            title: 'Operations and delivery',
            body:
              'Process design, documentation, cost control, stakeholder translation and making work less dependent on luck or heroics.'
          },
          {
            title: 'Training and communication',
            body:
              'Learning design, public communication, scripts, broadcasting instincts and explaining dry topics without embalming the audience.'
          }
        ]
      },
      {
        type: 'paragraph',
        text:
          'The career thread is practical systems thinking: find the hidden dependency, clarify the evidence, reduce unnecessary complexity, and make the work easier for the next person.'
      },
      {
        type: 'list',
        items: [
          'IT, support and operational environments',
          'Security awareness and risk communication',
          'Compliance, quality and audit-readiness thinking',
          'Training, documentation and stakeholder communication',
          'Supplier, cost and process sanity checks',
          'Small-business and venture building through everwished and related projects'
        ]
      },
      { type: 'cta', label: 'Contact Ian', href: '/contact' }
    ]
  },
  {
    id: 'workbench',
    icon: 'WB',
    title: 'Professional Workbench',
    shortTitle: 'Workbench',
    category: 'work',
    defaultSize: { width: 820, height: 640 },
    mobilePriority: 4,
    summary: 'Capability map and practical ways Ian can help.',
    content: [
      { type: 'heading', text: 'Professional Workbench' },
      {
        type: 'paragraph',
        text:
          'Useful support for organisations that need practical help rather than corporate theatre.'
      },
      {
        type: 'cards',
        cards: [
          { title: 'IT and operations', body: 'Untangle support, process, ownership, documentation and the unhelpful phrase "just ask Dave".' },
          { title: 'Security and risk', body: 'Make controls understandable, proportionate and less likely to collapse on a tired Tuesday.' },
          { title: 'Compliance and assurance', body: 'Separate evidence from decoration. Build audit readiness that also improves the work.' },
          { title: 'Training and learning', body: 'Design awareness, scripts and learning that people can remember after the certificate appears.' },
          { title: 'Supplier sanity checks', body: 'Test what is really happening, what it costs, who owns it, and where the fog begins.' },
          { title: 'Digital build and prototyping', body: 'Shape useful tools, content, workflows and prototypes without turning every idea into a platform.' }
        ]
      },
      { type: 'quote', text: 'Strategy without fog. Delivery without theatre. Humour where it helps the medicine go down.' }
    ]
  },
  {
    id: 'opinions',
    icon: '!!',
    title: 'Opinions, safely weaponised',
    shortTitle: 'Opinions',
    category: 'meta',
    defaultSize: { width: 760, height: 600 },
    mobilePriority: 9,
    summary: 'Working philosophy and public-safe opinions.',
    content: [
      { type: 'heading', text: 'Opinions, safely weaponised' },
      {
        type: 'cards',
        cards: [
          { title: 'Simplicity', body: 'Simple is not shallow. It is often the result of someone doing the hard thinking early enough.' },
          { title: 'Compliance', body: 'Compliance should clarify work. If it only creates a paperwork habitat, something has gone wrong.' },
          { title: 'Security awareness', body: 'Warnings people cannot understand are not controls. They are vibes with a policy number.' },
          { title: 'Technology ownership', body: 'Lock-in, rented functionality and hostile support models should be challenged before they become infrastructure.' },
          { title: 'AI', body: 'Useful when it reduces friction and expands capacity. Dangerous when it becomes fog, theatre or unaccountable decision-making.' },
          { title: 'Humour', body: 'Humour can lower defences, but the serious point still has to survive the joke.' }
        ]
      }
    ]
  },
  {
    id: 'everwished',
    icon: 'HQ',
    title: 'everwished // group in progress',
    shortTitle: 'everwished HQ',
    category: 'venture',
    defaultSize: { width: 800, height: 640 },
    mobilePriority: 5,
    summary: 'Umbrella group, principles and emerging services.',
    content: [
      { type: 'heading', text: 'everwished HQ' },
      {
        type: 'paragraph',
        text:
          'everwished is the developing umbrella for practical services built around simplicity, credibility, reliability and responsibility by design.'
      },
      {
        type: 'paragraph',
        text:
          'The aim is to help small organisations, charities, community groups and mission-led teams access useful digital, operational and creative capacity without being drowned in enterprise theatre.'
      },
      {
        type: 'cards',
        cards: [
          { title: 'Simplicity', body: 'Make the useful route easier to find.' },
          { title: 'Credibility', body: 'Say what is real, what is known and what still needs proof.' },
          { title: 'Reliability', body: 'Build services that survive ordinary human tiredness.' },
          { title: 'Responsibility by design', body: 'Care about consequences before the invoice has cooled.' }
        ]
      },
      { type: 'quote', text: 'Non-dick operating principle: be useful, be honest, and do not make the client feel stupid for needing help.' }
    ]
  },
  {
    id: 'charit',
    icon: 'CH',
    title: 'charIT // capacity for good people',
    shortTitle: 'charIT',
    category: 'venture',
    defaultSize: { width: 780, height: 620 },
    mobilePriority: 6,
    summary: 'Digital and operational help for charities and community groups.',
    content: [
      { type: 'heading', text: 'charIT' },
      {
        type: 'paragraph',
        text:
          'charIT exists because charities, community groups, clubs and CICs often need practical digital and operational support, not another strategy document wearing aftershave.'
      },
      {
        type: 'cards',
        cards: [
          { title: 'Useful help', body: 'Web, email, devices, process, data, security, evidence and day-to-day operational confidence.' },
          { title: 'Proportionate support', body: 'Advice that fits the risk, budget, people and time actually available.' },
          { title: 'Capacity building', body: 'Help teams understand, own and sustain their systems instead of becoming dependent on magic.' },
          { title: 'Digital Muirkirk pattern', body: 'Start local, make it useful, prove it works, then scale the pattern carefully.' }
        ]
      }
    ]
  },
  {
    id: 'ventures',
    icon: 'MAP',
    title: 'Ventures Map',
    shortTitle: 'Ventures',
    category: 'venture',
    defaultSize: { width: 900, height: 680 },
    mobilePriority: 7,
    summary: 'Map of public projects and their relationships.',
    content: [
      { type: 'heading', text: 'Ventures Map' },
      { type: 'quote', text: 'How do we make useful things easier for people who need them?' },
      {
        type: 'cards',
        cards: [
          { title: 'Ian Barrs', body: 'The personal and professional hub where the CV, voice, opinions, work and projects join together.' },
          { title: 'everwished', body: 'The umbrella: practical services around simplicity, credibility, reliability and responsibility by design.' },
          { title: 'charIT', body: 'Digital and operational capacity for good people doing good work.' },
          { title: 'River & Bean', body: 'A private, flexible cafe-style space in Ayr for quiet work, collaboration, meetings and selected public use.' },
          { title: 'Happy Coo', body: 'Small-batch Scottish confectionery, product storytelling and dairy-led mischief.' },
          { title: 'Tired of Tech', body: 'Plain-spoken technology commentary for people tired of lock-in, hostile design and subscription fog.' },
          { title: 'Media', body: 'Broadcasting, scripts, live formats, interviews, training voice and public communication.' }
        ]
      }
    ]
  },
  {
    id: 'riverbean',
    icon: 'R&B',
    title: 'River & Bean // private space, public value',
    shortTitle: 'River & Bean',
    category: 'venture',
    defaultSize: { width: 760, height: 560 },
    mobilePriority: 10,
    summary: 'Private, flexible space for coffee, collaboration and community use.',
    content: [
      { type: 'heading', text: 'River & Bean' },
      {
        type: 'paragraph',
        text:
          'River & Bean is a private, flexible cafe-style space in Ayr built around coffee, community and collaboration.'
      },
      {
        type: 'list',
        items: [
          'private hire',
          'approved daytime access',
          'trusted-member use',
          'meetings and small events',
          'quiet coworking by arrangement',
          'fundraising sessions',
          'content and creative use',
          'selected public sessions where they make sense'
        ]
      },
      {
        type: 'paragraph',
        text:
          'It sits inside the wider mission: local infrastructure, social good, practical community use and commercial activity that gives something back rather than simply extracting from the place around it.'
      }
    ]
  },
  {
    id: 'happycoo',
    icon: 'HC',
    title: 'Happy Coo // confectionery with consequences',
    shortTitle: 'Happy Coo',
    category: 'venture',
    defaultSize: { width: 720, height: 540 },
    mobilePriority: 11,
    summary: 'Dairy-led confectionery, product storytelling and cow nonsense.',
    content: [
      { type: 'heading', text: 'Happy Coo' },
      { type: 'quote', text: 'Take excellent dairy, treat it properly, add sugar, tell the truth, and do not be boring about it.' },
      {
        type: 'paragraph',
        text:
          'Happy Coo Confection Co is the sweet, dairy-led, cow-adjacent part of the ecosystem. The flagship idea is Fablet: a softer, richer, tablet-adjacent treat built around proper milk, butter and condensed dairy.'
      },
      {
        type: 'list',
        items: [
          'sourcing',
          'process',
          'labelling',
          'costing',
          'packaging',
          'shelf life',
          'storytelling',
          'distribution',
          'quality control'
        ]
      }
    ]
  },
  {
    id: 'media',
    icon: 'MIC',
    title: 'Media Deck',
    shortTitle: 'Media',
    category: 'media',
    defaultSize: { width: 780, height: 600 },
    mobilePriority: 8,
    summary: 'Broadcasting, streaming, scripts, training and public communication.',
    content: [
      { type: 'heading', text: 'Media Deck' },
      {
        type: 'paragraph',
        text:
          'Communication is not decoration. It is infrastructure. A process nobody understands will fail. A security warning nobody remembers will fail. A good idea nobody can explain will fail.'
      },
      {
        type: 'cards',
        cards: [
          { title: 'Radio and live formats', body: 'Timing, clarity, listening, improvisation and keeping a room with you.' },
          { title: 'Tired of Tech', body: 'Critical technology commentary for people who still love what technology can do, but are tired of what it often becomes.' },
          { title: 'Training voice', body: 'Structure, relevance, pacing, examples and a tone that respects the audience.' },
          { title: 'Scripts and presentation', body: 'Make dry topics survivable without losing the point.' }
        ]
      }
    ]
  },
  {
    id: 'evidence',
    icon: 'LOG',
    title: 'Evidence Log',
    shortTitle: 'Evidence',
    category: 'work',
    defaultSize: { width: 780, height: 620 },
    mobilePriority: 12,
    summary: 'Selected proof points and lessons without confidential details.',
    content: [
      { type: 'heading', text: 'Evidence Log' },
      {
        type: 'cards',
        cards: [
          { title: 'Early operations', body: 'Undocumented process is not harmless. It is a delayed consequence with a calendar invite.' },
          { title: 'Enterprise IT and suppliers', body: 'The useful skill is testing what is actually happening, where accountability sits and whether process reflects reality.' },
          { title: 'Compliance and audit readiness', body: 'The best compliance makes an organisation easier to understand and safer to operate.' },
          { title: 'Training and awareness', body: 'Good training respects the audience. Bad training says "be vigilant" and prints a certificate.' },
          { title: 'Public communication', body: 'Radio, streaming and live work transfer directly into leadership, training and stakeholder clarity.' },
          { title: 'Venture building', body: 'Say what is real, cost things honestly, admit constraints and ask what problem this actually solves.' }
        ]
      },
      {
        type: 'quote',
        text:
          'Trust comes from what can be checked. Proof beats promises. Everything else fades.'
      }
    ]
  },
  {
    id: 'contact',
    icon: '@',
    title: 'Contact Ian',
    shortTitle: 'Contact',
    category: 'core',
    defaultSize: { width: 640, height: 520 },
    mobilePriority: 13,
    summary: 'Contact routes and enquiry guidance.',
    content: [
      { type: 'heading', text: 'Contact Ian' },
      { type: 'paragraph', text: 'The simple route: helloianbarrs@gmail.com' },
      {
        type: 'list',
        items: [
          'IT, security, compliance or operations work',
          'training, awareness or learning design',
          'charity or community digital support',
          'everwished or charIT enquiries',
          'River & Bean collaboration or venue-use conversations',
          'media, broadcasting, scripting or commentary',
          'practical problem-solving where the current answer appears to be "nobody knows, but everyone is worried"'
        ]
      },
      {
        type: 'cards',
        cards: [
          { title: 'Helpful things to include', body: 'Who you are, what you are trying to do, what is in the way, urgency, constraints and what a useful first outcome would look like.' },
          { title: 'Probably not a fit', body: 'Buzzwords instead of delivery, rubber-stamping nonsense, silent nodding, miracle requests by Friday with no information, or a 90-page strategy deck nobody will use.' }
        ]
      },
      { type: 'cta', label: 'Email Ian', href: 'mailto:helloianbarrs@gmail.com' }
    ]
  },
  {
    id: 'terminal',
    icon: '>_',
    title: 'ianOS Terminal',
    shortTitle: 'Terminal',
    category: 'meta',
    defaultSize: { width: 720, height: 470 },
    mobilePriority: 14,
    summary: 'Command-line navigation and easter eggs.',
    content: []
  },
  {
    id: 'control',
    icon: 'CP',
    title: 'Control Panel',
    shortTitle: 'Control',
    category: 'meta',
    defaultSize: { width: 620, height: 500 },
    mobilePriority: 15,
    summary: 'Preferences, boot replay and simple-mode controls.',
    content: []
  }
];

export const appsById = new Map(apps.map((app) => [app.id, app]));

export const visibleApps = apps.filter((app) => app.id !== 'control');

export const simpleModeApps = apps.filter((app) => !['terminal', 'control'].includes(app.id));
