// studio-partnerships.jsx — Studio partnerships screens.
//
// Partnerships are not a built feature, so both screens are honest empty states.

// The fabricated PARTNERSHIPS dataset that lived here has been removed —
// there is no partnerships feature and no real deal data behind it.

function StatusPill({ status }) {
  const s = STATUS_STYLE[status] || STATUS_STYLE.inactive;
  return (
    <span style={{
      display: 'inline-flex', alignItems: 'center', gap: 4,
      padding: '3px 8px', borderRadius: 999, fontSize: 10.5,
      letterSpacing: '0.06em', textTransform: 'uppercase', fontWeight: 500,
      background: s.bg, color: s.fg,
    }}>{s.label}</span>
  );
}
function FeedDot({ status }) {
  const s = FEED_STYLE[status] || FEED_STYLE.missing;
  return (
    <span style={{ display: 'inline-flex', alignItems: 'center', gap: 6, fontSize: 12 }}>
      <span style={{ width: 6, height: 6, borderRadius: '50%', background: s.dot }}/>
      {s.label}
    </span>
  );
}

// ─── Logo placeholder — initial in a subtle tinted square ────────────────
function PartnerLogo({ name, size = 40 }) {
  const initials = name.split(/\s+/).slice(0, 2).map(w => w[0]).join('').slice(0, 2).toUpperCase();
  const hue = (name.charCodeAt(0) * 31) % 360;
  return (
    <div style={{
      width: size, height: size, borderRadius: 8,
      background: `oklch(0.94 0.025 ${hue})`,
      display: 'flex', alignItems: 'center', justifyContent: 'center',
      fontFamily: "'Instrument Serif', serif", fontStyle: 'italic',
      fontSize: size * 0.42, color: '#1a1a18', flexShrink: 0,
      letterSpacing: '-0.01em',
    }}>{initials}</div>
  );
}

// ─── Overview ─────────────────────────────────────────────────────────────
// Brand partnerships are not a built feature: there is no partnerships table,
// no brief workflow and no deal data. Both screens are honest empty states.
function StudioPartnerships() {
  return (
    <NotTrackedPage
      kicker="Studio · Partnerships"
      panelTitle="Partnership data"
      title="Brand partnerships."
      sub="Not built yet."
      body={<>modaBoard has no partnerships feature — no briefs, no deal
        pipeline, no deliverables and no fee data. The campaigns that used to
        fill this screen were sample content, not offers made to you.</>}
      metrics={['Active deals', 'Briefs & deliverables', 'Fees & payment terms', 'Campaign performance', 'Brand contacts']}
    />
  );
}

function StudioPartnershipDetail({ navTo }) {
  return (
    <div>
      <div style={{ marginBottom: 16 }}>
        <button onClick={() => navTo({ name: 'partnerships' })} style={{ ...linkBtn, color: '#5a5a54' }}>← All partnerships</button>
      </div>
      <NotTrackedPage
        kicker="Partnership"
      panelTitle="Partnership data"
        title="Partnership detail."
        sub="Not built yet."
        body="There is no partnership data to show."
        metrics={['Brief', 'Deliverables', 'Fee', 'Timeline']}
      />
    </div>
  );
}

Object.assign(window, { StudioPartnerships, StudioPartnershipDetail, PartnerLogo, StatusPill, FeedDot });
