import TimeTrackingFieldClient from "@/components/time-tracking/TimeTrackingFieldClient";
import { getBrandSettingsPublic } from "@/actions/brand-settings";
import {
  TUXEDO_BRAND_ID,
  TUXEDO_BRAND_NAME,
  TUXEDO_BRAND_ACCENT,
} from "@/lib/water-log/brand";

export const metadata = {
  title: `Worker Clock — ${TUXEDO_BRAND_NAME}`,
};

export default async function TuxedoTimeClockPage() {
  const settings = await getBrandSettingsPublic("tuxedo");
  const logoUrl = settings.success ? (settings.settings?.logo_url ?? null) : null;

  return (
    <TimeTrackingFieldClient
      brandId={TUXEDO_BRAND_ID}
      brandName={TUXEDO_BRAND_NAME}
      brandAccent={TUXEDO_BRAND_ACCENT}
      logoUrl={logoUrl}
    />
  );
}
