import { HydrationBoundary, dehydrate } from '@tanstack/react-query';
import PageContainer from '@/components/layout/page-container';
import { crmReferenceQueryOptions } from '@/features/crm/api/queries';
import { MasterOptionsPage } from '@/features/crm/components/settings-page';
import { getQueryClient } from '@/lib/query-client';

export default function MasterOptionsRoute() {
  const queryClient = getQueryClient();
  void queryClient.prefetchQuery(crmReferenceQueryOptions());

  return (
    <PageContainer
      pageTitle='Master Options'
      pageDescription='Mock UI สำหรับ status options, product types, payment term, currency และ tax rate'
    >
      <HydrationBoundary state={dehydrate(queryClient)}>
        <MasterOptionsPage />
      </HydrationBoundary>
    </PageContainer>
  );
}
