/* MainLayout.jsx — WebGNB + WebSidebar shell for KARE Partner Web */
const KARE = {
primary: '#0D7A6E',
primaryHover: '#E6F4F2',
primaryPressed: '#085C53',
gold: '#C9A84C',
n900: '#111827',
n700: '#374151',
n500: '#6B7280',
n300: '#D1D5DB',
n100: '#F3F4F6',
n000: '#FFFFFF',
// status
voucher_issued: '#2563EB',
voucher_active: '#059669',
voucher_used: '#7C3AED',
voucher_expired: '#9CA3AF',
voucher_cancelled: '#6B7280',
voucher_pending: '#D97706',
bk_requested: '#F59E0B',
bk_confirmed: '#059669',
bk_rejected: '#DC2626',
bk_completed: '#7C3AED',
// semantic
error: '#DC2626', errorBg: '#FEF2F2',
warning: '#D97706', warningBg: '#FFFBEB',
success: '#059669', successBg: '#ECFDF5',
info: '#0284C7', infoBg: '#F0F9FF',
// shadows
shadowSm: '0 1px 3px rgba(0,0,0,0.10)',
shadowMd: '0 4px 12px rgba(0,0,0,0.12)',
shadowLg: '0 8px 24px rgba(0,0,0,0.15)',
};
const FONT = "'Inter', 'Pretendard', 'Noto Sans KR', system-ui, -apple-system, sans-serif";
/* ---------- Icons ---------- */
const I = {
dashboard: (p) => (
),
booking: (p) => (
),
voucher: (p) => (
),
settlement: (p) => (
),
cancel: (p) => (
),
products: (p) => (
),
manual: (p) => (
),
support: (p) => (
),
settings: (p) => (
),
logout: (p) => (
),
chevron: (p) => (
),
arrowUp: (p) => (
),
arrowDown: (p) => (
),
warn: (p) => (
),
lock: (p) => (
),
bell: (p) => (
),
users: (p) => (
),
};
/* ---------- GNB ---------- */
function WebGNB({ partnerName = 'Seoul Aesthetic Clinic', userName = 'Ji-hyun Park', suspended = false }) {
const navItems = ['대시보드', '예약 관리', '바우처 관리', '정산', '고객관리'];
const active = '대시보드';
return (
{/* Logo */}
{/* Center nav */}
{navItems.map((n) => (
{n}
))}
{/* Right */}
{partnerName}
{suspended && (
SUSPENDED
)}
{userName}
JP
Logout
);
}
/* ---------- Sidebar ---------- */
function WebSidebar({ active = 'dashboard', disabledItems = [] }) {
const items = [
{ id: 'dashboard', label: '대시보드', icon: I.dashboard },
{ id: 'booking', label: '예약 관리', icon: I.booking },
{ id: 'voucher', label: '바우처 관리', icon: I.voucher },
{ id: 'settlement', label: '정산 내역', icon: I.settlement },
{ id: 'manual', label: '수동 사용처리', icon: I.manual },
{ id: 'cancel', label: '취소 요청', icon: I.cancel },
{ id: 'products', label: '상품 관리', icon: I.products },
{ id: 'support', label: '1:1 문의', icon: I.support },
{ id: 'settings', label: '설정', icon: I.settings },
];
return (
Menu
{items.map((it) => {
const isActive = it.id === active;
const isDisabled = disabledItems.includes(it.id);
return (
{isActive && (
)}
{it.label}
{isDisabled &&
}
);
})}
);
}
/* ---------- MainLayout shell ---------- */
function MainLayout({ children, suspended = false, sidebarActive = 'dashboard', sidebarDisabled = [], banner = null }) {
return (
);
}
/* ---------- Status badge ---------- */
function StatusBadge({ kind = 'requested', label }) {
const map = {
requested: { color: KARE.bk_requested, bg: '#FFFBEB', border: 'rgba(245,158,11,0.2)', t: 'REQUESTED' },
confirmed: { color: KARE.bk_confirmed, bg: '#ECFDF5', border: 'rgba(5,150,105,0.2)', t: 'CONFIRMED' },
rejected: { color: KARE.bk_rejected, bg: '#FEF2F2', border: 'rgba(220,38,38,0.2)', t: 'REJECTED' },
completed: { color: KARE.bk_completed, bg: '#F5F3FF', border: 'rgba(124,58,237,0.2)', t: 'COMPLETED' },
issued: { color: KARE.voucher_issued, bg: '#EFF6FF', border: 'rgba(37,99,235,0.2)', t: 'ISSUED' },
active: { color: KARE.voucher_active, bg: '#ECFDF5', border: 'rgba(5,150,105,0.2)', t: 'ACTIVE' },
fully_used: { color: KARE.voucher_used, bg: '#F5F3FF', border: 'rgba(124,58,237,0.2)', t: 'FULLY_USED' },
expired: { color: KARE.voucher_expired,bg: '#F3F4F6', border: 'rgba(156,163,175,0.3)', t: 'EXPIRED' },
};
const s = map[kind] || map.requested;
return (
{label || s.t}
);
}
Object.assign(window, { KARE, FONT, I, MainLayout, WebGNB, WebSidebar, StatusBadge });