/* ============================================================================= * B05_Profile_UI_Profile_Panel.ts * 종단 보기의 하단 종단도 — 종단도 한 벌(`A00_Common/design/design_profile.ts`)에 * 오른쪽 판(배수유역도)을 끼워 만든다(계획서 24-2c). * * 본체는 종단도 한 벌로 옮겼다. 여기는 종단 보기가 부르던 이름 · 모양을 지킨다 — * 페이지는 `drainage` 로 배수유역도를 바로 부른다. * ========================================================================== */ import { createDesignProfile } from "../A00_Common/design/design_profile"; import type { DesignSideBoard } from "../A00_Common/design/design_profile"; import { createDrainageSide } from "./B05_Profile_UI_Drainage_Side"; import type { RouteProfilePanelCallbacks } from "./B05_Profile_UI_Profile_Panel_Types"; /** 콜백 타입은 `_Panel_Types` 에 있다 — 옛 임포트 경로가 그대로 동작하도록 다시 내보낸다. */ export type { RouteProfilePanelCallbacks } from "./B05_Profile_UI_Profile_Panel_Types"; export function createRouteProfilePanel( projectId: string, /** 측점 선택 변경 — 같은 측점 재선택·빈 곳 클릭이면 null(해제)로 알린다. */ onSelectStation: (stationId: string | null) => void, /** [초기선 복원] 클릭 시 함께 실행(비정규 측점 등 다른 조작값도 초기화하려고 Page가 넘긴다). */ onResetAll?: () => void, callbacks?: RouteProfilePanelCallbacks, ) { const profile = createDesignProfile({ projectId, view: "profile", side: createDrainageSide, onSelectStation, onResetAll, callbacks, }); /** 배수유역도 패널 — 경로 확정 흐름에서 유역선 편집 저장 여부를 묻는 데 쓴다. */ const drainage = profile.side as DesignSideBoard; return { ...profile, drainage }; }