/**
 * slides/02-what-is-openswe.js
 * ----------------------------------------------------------------------------
 * Slide 02 -- What is Open SWE: positioning
 * One big picture slide with positioning callout.
 */
'use strict';

const { helpers, layouts } = require('../../design-system');

function buildWhatIsOpenSWE(pres, theme) {
  const slide = pres.addSlide();
  helpers.slideBase(slide, pres, theme);
  helpers.addHeader(slide, pres, theme, {
    eyebrow: 'STAGE 4',
    sectionNumber: 4,
    title: 'Open SWE: позиционирование',
  });

  // Left column: intro callout
  helpers.addCallout(slide, pres, theme, {
    x: 0.5, y: layouts.CONTENT_TOP, w: 4.5, h: 1.55,
    kind: 'info',
    title: 'Не готовый продукт',
    text:
      'Стартовый шаблон, не ' +
      'SaaS. Ops-работа: sandbox, ' +
      'модель, триггеры, промпты.',
  });

  helpers.addCallout(slide, pres, theme, {
    x: 0.5, y: 3.1, w: 4.5, h: 1.75,
    kind: 'success',
    title: 'Colleague, not copilot',
    text:
      'Внутренний кодинг-агент, ' +
      'не IDE-assistant. Slack / ' +
      'Linear / GitHub -> draft PR ' +
      'с тестами.',
  });

  // Right column: key facts
  helpers.addCodeBlock(slide, pres, theme, {
    x: 5.3, y: layouts.CONTENT_TOP, w: 4.2, h: 3.4,
    language: 'python',
    code: [
      '# github.com/langchain-ai/open-swe',
      '',
      'stars:    ~10k',
      'commits:  971+',
      'license:  MIT',
      'language: Python + TypeScript',
      'announce: 08.2025',
      'rewrite:  03.2026',
      '',
      '# blog.langchain.com/open-swe',
      '# INSTALLATION.md',
      '# CUSTOMIZATION.md',
    ].join('\n'),
    filePath: 'meta: open-swe repo',
    startLine: 1,
  });

  helpers.addPageNumber(slide, pres, theme, 2);
  helpers.addSourceLine(slide, pres, theme, {
    source: 'github.com/langchain-ai/open-swe (README + INSTALLATION.md)',
  });
  return slide;
}

module.exports = { buildWhatIsOpenSWE };
