import { CUSTOMER_SERVICE_PHONE } from '@dukang/shared-types'; import { track } from '../lib/analytics'; import { openWecomCustomerService } from '../lib/customer-service'; type ContactCustomerSheetProps = { orderId?: string; orderNo?: string; onClose: () => void; }; export default function ContactCustomerSheet({ orderId, onClose }: ContactCustomerSheetProps) { const tel = CUSTOMER_SERVICE_PHONE.replace(/-/g, ''); function openPhone() { track('cs_contact', { type: 'phone', orderId }); window.location.href = `tel:${tel}`; onClose(); } function openOnline() { track('cs_contact', { type: 'wecom_kf', orderId }); if (openWecomCustomerService()) { onClose(); } } return (