import { getDisplayStatusTag } from "./bookingCalendarDateUtils";
export function getDrawerStatusTheme(item, dateKey) {
  var tag = getDisplayStatusTag(item, dateKey);
  if (item.kind === 'block') return 'bg-red-700/88 border-b-4 border-red-300/55';
  if (tag === 'cancel') return 'bg-zinc-700/88 border-b-4 border-zinc-400/45';
  if (tag === 'no_show') return 'bg-zinc-700/88 border-b-4 border-red-400/75';
  if (tag === 'late') return 'bg-violet-700/92 border-b-4 border-amber-400/95';
  if (tag === 'checked_in') return 'bg-violet-700/92 border-b-4 border-zinc-300/45';
  return 'bg-violet-700/92 border-b-4 border-violet-300/30';
}
export function paymentTagClass(label) {
  var isLight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  switch (label) {
    case 'Paid':
      return isLight ? 'theme-success-chip border' : 'bg-emerald-500 text-white';
    case 'Partial paid':
      return isLight ? 'theme-warning-chip border' : 'bg-amber-500 text-white';
    case 'Refunded':
      return isLight ? 'theme-info-chip border' : 'bg-sky-500 text-white';
    case 'Unpaid':
    default:
      return isLight ? 'theme-danger-chip border' : 'bg-red-500 text-white';
  }
}
export function fulfillmentTagClass(label) {
  var isLight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  switch (label) {
    case 'Finished':
      return isLight ? 'theme-success-chip border' : 'bg-emerald-600 text-white';
    case 'Arrived':
      return isLight ? 'theme-info-chip border' : 'bg-cyan-500 text-white';
    case 'Late':
      return isLight ? 'theme-warning-chip border' : 'bg-amber-500 text-white';
    case 'No-show':
      return isLight ? 'theme-danger-chip border' : 'bg-red-600 text-white';
    case 'Cancelled':
      return isLight ? 'border border-[var(--border-strong)] bg-[var(--bg-input)] theme-text-soft' : 'bg-zinc-600 text-white';
    default:
      return isLight ? 'border border-[var(--brand-light)] bg-[var(--brand-surface)] theme-brand-text' : 'bg-violet-600 text-white';
  }
}
export function getBookingStateClasses(item, dateKey) {
  var displayTag = getDisplayStatusTag(item, dateKey);
  if (displayTag === 'cancel') return 'bg-zinc-700/55 border border-zinc-500/70 text-zinc-100 grayscale-[0.2]';
  if (displayTag === 'no_show') return 'bg-zinc-700/55 border border-red-500/70 text-zinc-200 grayscale-[0.15]';
  if (displayTag === 'late') return 'bg-violet-700/90 border border-amber-400/80 text-violet-50';
  if (item.kind === 'block') return 'bg-red-700/70 text-red-100';
  return 'bg-violet-700/90 text-violet-50';
}

/**
 * 月 / 周紧凑格：不按签到/取消/迟到等状态变色，仅区分 booking（默认紫）与 block（红）。
 * 与 {@link getBookingStateClasses} 在无状态分支时一致，但不读取 `dateKey`。
 */
export function getGridBookingRowStateClasses(item) {
  if (item.kind === 'block') return 'bg-red-700/70 text-red-100';
  return 'bg-violet-700/90 text-violet-50';
}