const DS = window.MarketValueLabDesignSystem_9097d5;
const {
  Button, IconButton, Tag, Badge, Input, Select, Checkbox, Radio, Switch,
  Card, SectionHeader, Tabs, Breadcrumb, Pagination, Dialog, Toast, Tooltip,
  Thumb, ArticleCard, ConcernCard, StatBlock, RoadmapStep, CTAPanel, AuthorByline, PullQuote, NewsletterSignup,
  Logo, SiteHeader, SiteFooter,
} = DS;

const LOGO = (window.__resources && window.__resources.logo) || '../../assets/logo-horizontal-trimmed.png';

function Ic({ n, s = 18 }) {
  const ref = React.useRef(null);
  React.useEffect(() => {
    const d = window.lucide && window.lucide.icons && window.lucide.icons[n];
    if (!ref.current || !d) return;
    ref.current.innerHTML = '';
    const el = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
    el.setAttribute('viewBox', '0 0 24 24'); el.setAttribute('width', s); el.setAttribute('height', s);
    el.setAttribute('fill', 'none'); el.setAttribute('stroke', 'currentColor'); el.setAttribute('stroke-width', '1.75');
    el.setAttribute('stroke-linecap', 'round'); el.setAttribute('stroke-linejoin', 'round');
    el.innerHTML = d[2].map(([t, a]) => '<' + t + ' ' + Object.entries(a).map(([k, v]) => k + '="' + v + '"').join(' ') + '/>').join('');
    ref.current.appendChild(el);
  }, [n, s]);
  return <span ref={ref} style={{ display: 'inline-flex' }} />;
}

const Container = ({ children, width, style }) => (
  <div style={{ maxWidth: width || 'var(--container)', margin: '0 auto', padding: '0 var(--gutter)', ...style }}>{children}</div>
);
const Section = ({ children, tone, tight, style }) => (
  <section style={{ padding: (tight ? 'var(--section-y-tight)' : 'var(--section-y)') + ' 0', background: tone === 'subtle' ? 'var(--surface-subtle)' : tone === 'inverse' ? 'var(--surface-inverse-deep)' : 'transparent', ...style }}>{children}</section>
);

const NAV = ['市場価値', 'キャリアアップ', '転職', '学習・リスキリング', 'キャリアストーリー'];

const ARTICLES = [
  { category: 'value', categoryLabel: '市場価値', title: '年収が上がらない本当の理由と、いま測るべき3つの指標', excerpt: '給与テーブルではなく、労働市場での代替可能性から考える。評価と価値のズレを埋める視点。', date: '2026.08.10', readTime: '7分', author: '編集部 田中' },
  { category: 'learning', categoryLabel: '学習・リスキリング', title: '30代からの学び直しは「時間」ではなく「順番」で決まる', excerpt: '学習投資のリターンを最大化する順序設計。何から手をつけるかで3年後が変わる。', date: '2026.08.08', readTime: '9分', author: '編集部 佐藤' },
  { category: 'growth', categoryLabel: 'キャリアアップ', title: 'マネジメントに進むべきか、専門性を深めるべきか', excerpt: '二択に見えて実は三択。市場が値付けするのは肩書きではなく再現性のある成果。', date: '2026.08.05', readTime: '6分', author: '編集部 鈴木' },
  { category: 'change', categoryLabel: '転職', title: '転職を「しない」判断が市場価値を上げるとき', excerpt: '動く前に社内で獲れる経験を棚卸しする。転職はゴールではなく手段。', date: '2026.08.03', readTime: '8分', author: '編集部 田中' },
  { category: 'story', categoryLabel: 'キャリアストーリー', title: '事業会社からコンサルへ。34歳の意思決定プロセス', excerpt: '年収ではなく「意思決定の量」で選んだ結果、3年で市場価値はどう変わったか。', date: '2026.08.02', readTime: '11分', author: '編集部 佐藤' },
  { category: 'concern', categoryLabel: '仕事の悩み', title: '「このままでいいのか」を放置すると起きること', excerpt: '違和感は情報。感情ではなくデータとして扱うためのフレーム。', date: '2026.07.30', readTime: '5分', author: '編集部 鈴木' },
];

const CONCERNS = [
  { icon: 'TrendingUp', label: '年収が上がらない', count: 42 },
  { icon: 'Compass', label: 'キャリアの方向性が見えない', count: 31 },
  { icon: 'Users', label: '評価されていない気がする', count: 24 },
  { icon: 'GraduationCap', label: '何を学べばいいか分からない', count: 38 },
  { icon: 'BriefcaseBusiness', label: '転職すべきか迷っている', count: 47 },
  { icon: 'Target', label: '専門性がないと感じる', count: 19 },
];

Object.assign(window, { DS, Button, IconButton, Tag, Badge, Input, Select, Checkbox, Radio, Switch, Card, SectionHeader, Tabs, Breadcrumb, Pagination, Dialog, Toast, Tooltip, Thumb, ArticleCard, ConcernCard, StatBlock, RoadmapStep, CTAPanel, AuthorByline, PullQuote, NewsletterSignup, Logo, SiteHeader, SiteFooter, Ic, Container, Section, NAV, ARTICLES, CONCERNS, LOGO });
