"use client"; import Link from "next/link"; import { Calendar, MapPin, Scissors, User, Building2, Sparkles, Gift, Clock } from "lucide-react"; import { Card, CardContent, Badge } from "@/components/ds"; import { cn } from "@/lib/utils"; import { BeautyStatusChip } from "./BeautyStatusChip"; import { businessFormatLabels } from "./tokens"; import type { Appointment, Branch, BeautyService, CustomerProfile, Organization, PackageDefinition, StaffProfile, } from "@/modules/beauty/services/beauty-business-api"; function CardShell({ children, href, className, }: { children: React.ReactNode; href?: string; className?: string; }) { const inner = ( {children} ); if (href) return {inner}; return inner; } export function CenterCard({ org, href }: { org: Organization; href?: string }) { return (

{org.name}

{org.code}

{businessFormatLabels[org.business_format] ?? org.business_format}
); } export function SalonCard({ branch, href }: { branch: Branch; href?: string }) { return (

{branch.name}

{branch.code}

); } export function ServiceCard({ service, href }: { service: BeautyService; href?: string }) { return (

{service.name}

{service.base_duration_minutes} دقیقه {service.base_price != null ? ` · ${service.base_price.toLocaleString("fa-IR")}` : ""}

); } export function StaffCard({ staff, href }: { staff: StaffProfile; href?: string }) { return (

{staff.display_name}

{staff.kind}

); } export function AppointmentCard({ appointment, staffName, serviceName, href, actions, }: { appointment: Appointment; staffName?: string; serviceName?: string; href?: string; actions?: React.ReactNode; }) { const start = new Date(appointment.scheduled_start); return (
{appointment.code}

{start.toLocaleString("fa-IR")}

{staffName ? (

{staffName}

) : null} {serviceName ? (

{serviceName}

) : null}
{actions ?
{actions}
: null}
); } export function PackageCard({ pkg, href }: { pkg: PackageDefinition; href?: string }) { return (

{pkg.name}

{pkg.total_sessions} جلسه {pkg.price != null ? ` · ${pkg.price.toLocaleString("fa-IR")}` : ""}

); } export function CustomerCard({ customer, href }: { customer: CustomerProfile; href?: string }) { return (

{customer.display_name}

{customer.mobile ?? customer.code}

); } export function QueueRow({ position, title, subtitle, status, actions, }: { position: number; title: string; subtitle?: string; status: string; actions?: React.ReactNode; }) { return (
{position}

{title}

{subtitle ?

{subtitle}

: null}
{actions}
); } export function SearchResultRow({ title, meta, href, }: { title: string; meta: string; href: string; }) { return (

{title}

{meta}

); } export function TimelineItem({ title, subtitle, time, active, }: { title: string; subtitle?: string; time?: string; active?: boolean; }) { return (

{title}

{subtitle ?

{subtitle}

: null} {time ? (

{time}

) : null}
); }