import { useState } from 'react'; import { Box, Container, Typography, Card, CardContent, Button, Checkbox, FormControlLabel, Chip, Grid, IconButton, Dialog, DialogTitle, DialogContent, DialogActions, Link, } from '@mui/material'; import { ArrowBack, CheckCircle, Edit, RocketLaunch, Save, People, AttachMoney, TrendingUp } from '@mui/icons-material'; import { EventData } from '../page'; import { cardStyles, colors, responsiveText } from '@/shared/lib/button-styles'; interface ApprovalStepProps { eventData: EventData; onApprove: () => void; onBack: () => void; } export default function ApprovalStep({ eventData, onApprove, onBack }: ApprovalStepProps) { const [agreeTerms, setAgreeTerms] = useState(false); const [termsDialogOpen, setTermsDialogOpen] = useState(false); const [successDialogOpen, setSuccessDialogOpen] = useState(false); const [isDeploying, setIsDeploying] = useState(false); const handleApprove = () => { if (!agreeTerms) return; setIsDeploying(true); // 배포 시뮬레이션 setTimeout(() => { setIsDeploying(false); setSuccessDialogOpen(true); }, 2000); }; const handleSaveDraft = () => { // TODO: 임시저장 API 연동 alert('임시저장되었습니다'); }; const getChannelNames = (channels?: string[]) => { const channelMap: Record = { uriTV: '우리동네TV', ringoBiz: '링고비즈', genieTV: '지니TV', sns: 'SNS', }; return channels?.map((ch) => channelMap[ch] || ch) || []; }; return ( {/* Header */} 최종 승인 {/* Title Section */} 이벤트를 확인해주세요 모든 정보를 검토한 후 배포하세요 {/* Event Summary Statistics */} 이벤트 제목 {eventData.recommendation?.title || '이벤트 제목'} 목표 참여자 {eventData.recommendation?.expectedParticipants || 0} 예상 비용 {((eventData.recommendation?.estimatedCost || 0) / 10000).toFixed(0)} 만원 예상 ROI {eventData.recommendation?.roi || 0}% {/* Event Details */} 이벤트 상세 이벤트 제목 {eventData.recommendation?.title} 경품 {eventData.recommendation?.prize} 참여 방법 {eventData.recommendation?.participationMethod} {/* Distribution Channels */} 배포 채널 {getChannelNames(eventData.channels).map((channel) => ( ))} {/* Terms Agreement */} setAgreeTerms(e.target.checked)} sx={{ color: colors.purple, '&.Mui-checked': { color: colors.purple, }, }} /> } label={ 이벤트 약관 및 개인정보 처리방침에 동의합니다{' '} (필수) } /> setTermsDialogOpen(true)} sx={{ ...responsiveText.body2, ml: 4, mt: 2, fontWeight: 600, color: colors.purple }} > 약관 보기 {/* Action Buttons */} {/* Terms Dialog */} setTermsDialogOpen(false)} maxWidth="sm" fullWidth PaperProps={{ sx: { borderRadius: 4, }, }} > 이벤트 약관 제1조 (목적) 본 약관은 KT AI 이벤트 마케팅 서비스를 통해 진행되는 이벤트의 참여 및 개인정보 처리에 관한 사항을 규정합니다. 제2조 (개인정보 수집 및 이용) 수집 항목: 이름, 전화번호, 이메일 이용 목적: 이벤트 참여 확인 및 경품 제공 보유 기간: 이벤트 종료 후 6개월 제3조 (당첨자 발표) 당첨자는 이벤트 종료 후 7일 이내 개별 연락 드립니다. {/* Success Dialog */} { setSuccessDialogOpen(false); onApprove(); }} PaperProps={{ sx: { borderRadius: 4, }, }} > 배포 완료! 이벤트가 성공적으로 배포되었습니다.
실시간으로 참여자를 확인할 수 있습니다.
); }