import { type ComponentType } from 'react'; import { YoutubeFilled, InstagramFilled, FacebookFilled, GlobeFilled, TiktokFilled, } from '../icons/FilledIcons'; import { CHANNEL_OPTIONS, type StudioChannel, type ContentFormat } from '../../types/studio'; interface Props { selectedChannel: StudioChannel | null; selectedFormat: ContentFormat | null; onChannelSelect: (ch: StudioChannel | null) => void; onFormatSelect: (fmt: ContentFormat | null) => void; } const iconMap: Record> = { youtube: YoutubeFilled, instagram: InstagramFilled, facebook: FacebookFilled, globe: GlobeFilled, tiktok: TiktokFilled, }; export default function ChannelFormatStep({ selectedChannel, selectedFormat, onChannelSelect, onFormatSelect }: Props) { const activeChannel = CHANNEL_OPTIONS.find(c => c.channel === selectedChannel); return (
{/* Channel Selection */}

채널 선택

콘텐츠를 게시할 채널을 선택하세요

{CHANNEL_OPTIONS.map(ch => { const Icon = iconMap[ch.icon] ?? GlobeFilled; const isSelected = selectedChannel === ch.channel; return ( ); })}
{/* Format Selection */} {activeChannel && (

포맷 선택

{activeChannel.label}에 적합한 콘텐츠 포맷을 선택하세요

{activeChannel.formats.map(fmt => { const isSelected = selectedFormat === fmt.key; return ( ); })}
)}
); }