// Full Astra Office webview HTML composition.
// 옛 sidebarProvider.ts 의 거대한 _pixelOfficePanelHtml 을 4개 파일로 분리한 entry.
// 이번 세션은 *동작 동등 분리* 만. 다음 세션에 mini view 와 공통 presenter 도입.

import { OFFICE_CSS } from './officeStyles';
import { OFFICE_BODY } from './officeBody';
import { officeRuntimeJs } from './runtime';

export interface AstraOfficePanelAssets {
    cspSource: string;
    derivedBase: string;
}

export function renderAstraOfficePanelHtml(assets: AstraOfficePanelAssets): string {
    return `<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src ${assets.cspSource} data:; style-src 'unsafe-inline'; script-src 'unsafe-inline';" />
<style>
${OFFICE_CSS}
</style></head>
<body>
${OFFICE_BODY}
${officeRuntimeJs(assets.derivedBase)}</body></html>`;
}
