/* ============================================================================= * B09_Estimation_UI_Tab_Legacy.ts * 옛 B09 화면의 탭을 새 틀에 **그대로 이어 붙이는** 자리 (PLAN 12장 · 2026-09-14 브레인 판정) * * - 원가계산서(→ 랩탑_메인 새 탭 파일) · 중기 · 관급·사급 · 기초자료(계수 고르개 = 계산 입력) · * 설계서 구성 · 산출기초 — 새 탭 파일이 서면 틀 등록 한 줄을 바꾸고, 다 바뀌면 이 파일과 옛 파일을 지움. * - 옛 화면 한 벌을 처음 고를 때 한 번 세우고 탭끼리 나눠 씀(옛 상태·캐시 그대로). * ========================================================================== */ import type { ui_locales } from "@ui/ui_template_locale"; import type { B09Tab } from "./B09_Estimation_UI_Shell_Types"; import { L } from "./B09_Estimation_UI_Sheet"; import { createLegacyEstimation, type LegacyEstimation } from "./B09_Estimation_UI_Page"; let legacy: LegacyEstimation | null = null; export function legacyTab(key: string, labelKey: keyof typeof ui_locales): B09Tab { return { key, label: () => L(labelKey), render(ctx) { legacy ??= createLegacyEstimation(ctx.root); legacy.main.classList.add("b09s-legacy"); ctx.body.append(legacy.main); // 옛 좌측 칸은 원가계산서 입력 — 그 탭에서만 보임. if (key === "cost_sheet") ctx.panel.append(legacy.panel); legacy.select(key); }, }; }