49 lines
2.0 KiB
TypeScript
49 lines
2.0 KiB
TypeScript
import { useState } from "react";
|
|
import { SegmentTabButton } from "@/features/plan/ui/SegmentTabButton";
|
|
import type { ContentStrategyData } from "@/features/plan/types/marketingPlan";
|
|
import {
|
|
CONTENT_STRATEGY_TAB_ITEMS,
|
|
type ContentStrategyTabKey,
|
|
} from "@/features/plan/ui/contentStrategy/contentStrategyTabs";
|
|
import { ContentStrategyPillarsTab } from "@/features/plan/ui/contentStrategy/ContentStrategyPillarsTab";
|
|
import { ContentStrategyRepurposingTab } from "@/features/plan/ui/contentStrategy/ContentStrategyRepurposingTab";
|
|
import { ContentStrategyTypesTab } from "@/features/plan/ui/contentStrategy/ContentStrategyTypesTab";
|
|
import { ContentStrategyWorkflowTab } from "@/features/plan/ui/contentStrategy/ContentStrategyWorkflowTab";
|
|
|
|
type ContentStrategyPanelProps = {
|
|
data: ContentStrategyData;
|
|
};
|
|
|
|
export function ContentStrategyPanel({ data }: ContentStrategyPanelProps) {
|
|
const [activeTab, setActiveTab] = useState<ContentStrategyTabKey>("pillars");
|
|
|
|
return (
|
|
<div>
|
|
<div className="flex flex-wrap gap-2 mb-8" role="tablist" aria-label="콘텐츠 전략 탭">
|
|
{CONTENT_STRATEGY_TAB_ITEMS.map((tab) => {
|
|
const isActive = activeTab === tab.key;
|
|
return (
|
|
<SegmentTabButton
|
|
key={tab.key}
|
|
role="tab"
|
|
aria-selected={isActive}
|
|
title={tab.labelKr}
|
|
active={isActive}
|
|
onClick={() => setActiveTab(tab.key)}
|
|
>
|
|
{tab.label}
|
|
</SegmentTabButton>
|
|
);
|
|
})}
|
|
</div>
|
|
|
|
{activeTab === "pillars" ? <ContentStrategyPillarsTab pillars={data.pillars} /> : null}
|
|
{activeTab === "types" ? <ContentStrategyTypesTab rows={data.typeMatrix} /> : null}
|
|
{activeTab === "workflow" ? <ContentStrategyWorkflowTab steps={data.workflow} /> : null}
|
|
{activeTab === "repurposing" ? (
|
|
<ContentStrategyRepurposingTab source={data.repurposingSource} outputs={data.repurposingOutputs} />
|
|
) : null}
|
|
</div>
|
|
);
|
|
}
|