{"version":3,"file":"WelcomePanel.cjs","names":["useT","useStore","sessionsStore","EmptyState","MessageIcon","openGeneralSession","openNewSession","Kbd","UPDATE_REQUIRED_REASON"],"sources":["../../../src/web/components/WelcomePanel.tsx"],"sourcesContent":["import { useT } from '@agimon-ai/po-core/web';\nimport { EmptyState, Kbd, MessageIcon } from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\n\nimport { openGeneralSession, openNewSession } from '../stores/newSessionStore';\nimport { sessionsStore, UPDATE_REQUIRED_REASON } from '../stores/sessionsStore';\n\n/**\n * What the cockpit shows before there is anything to show.\n *\n * It stands where the conversation goes, and it stands alone: the composer and\n * the selection bar address a session's agent, so with no session there is\n * nothing for them to address and the page hides them rather than offering a\n * box that sends nowhere.\n *\n * New session opens the same dialog the rail's plus and ctrl+t open, so a\n * session starts the same way however you asked for it. Create workspace is the\n * quieter second step, the same dialog the rail's add workspace opens.\n *\n * With no session there is no activity dock notice either, so an outdated app\n * says so here.\n */\nexport function WelcomePanel() {\n  const t = useT();\n  const updateRequired = useStore(sessionsStore, (state) => state.updateRequired);\n  return (\n    <EmptyState\n      data-testid=\"welcome\"\n      size=\"page\"\n      icon={<MessageIcon />}\n      title={t('webDashboard.welcome.title', 'No session yet')}\n      description={t('webDashboard.welcome.description', 'Start a session to work with Po. No workspace needed.')}\n      action={{\n        label: t('webDashboard.welcome.newSession', 'New session'),\n        onAction: () => openGeneralSession(),\n        // An outdated app cannot start sessions; the notice below says why.\n        disabled: updateRequired,\n        testId: 'welcome-new-session',\n      }}\n      secondaryAction={{\n        label: t('webDashboard.welcome.createWorkspace', 'Create workspace'),\n        onAction: () => openNewSession(null),\n        disabled: updateRequired,\n      }}\n    >\n      <span className=\"flex flex-wrap items-center justify-center gap-1.5 text-sm text-po-dim\">\n        <Kbd>ctrl+t</Kbd> {t('webDashboard.welcome.newSessionHint', 'new session')} · <Kbd>ctrl+k</Kbd>{' '}\n        {t('webDashboard.welcome.commandsHint', 'commands')}\n      </span>\n      {updateRequired ? (\n        <output data-testid=\"welcome-update-required\" className=\"block text-sm text-po-magenta\">\n          {UPDATE_REQUIRED_REASON}\n        </output>\n      ) : null}\n    </EmptyState>\n  );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAgB,eAAe;CAC7B,MAAM,KAAA,GAAIA,uBAAAA,KAAAA,CAAK;CACf,MAAM,kBAAA,GAAiBC,sBAAAA,SAAAA,CAASC,sBAAAA,gBAAgB,UAAU,MAAM,cAAc;CAC9E,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,6BAAAA,YAAD;EACE,eAAY;EACZ,MAAK;EACL,MAAM,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,aAAD,CAAc,CAAA;EACpB,OAAO,EAAE,8BAA8B,gBAAgB;EACvD,aAAa,EAAE,oCAAoC,uDAAuD;EAC1G,QAAQ;GACN,OAAO,EAAE,mCAAmC,aAAa;GACzD,gBAAgBC,wBAAAA,mBAAmB;GAEnC,UAAU;GACV,QAAQ;EACV;EACA,iBAAiB;GACf,OAAO,EAAE,wCAAwC,kBAAkB;GACnE,gBAAgBC,wBAAAA,eAAe,IAAI;GACnC,UAAU;EACZ;EAjBF,UAAA,CAmBE,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD;GAAM,WAAU;GAAhB,UAAA;IACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,KAAD,EAAA,UAAK,SAAW,CAAA;IAAC;IAAE,EAAE,uCAAuC,aAAa;IAAE;IAAG,iBAAA,GAAA,kBAAA,IAAA,CAACA,6BAAAA,KAAD,EAAA,UAAK,SAAW,CAAA;IAAE;IAC/F,EAAE,qCAAqC,UAAU;GAC9C;EACL,CAAA,GAAA,iBACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;GAAQ,eAAY;GAA0B,WAAU;GACrDC,UAAAA,sBAAAA;EACK,CAAA,IACN,IACM;;AAEhB"}