import { useState } from 'react';
import { PATHS } from '@/shared/constants/paths';
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
import { MerchantTab } from '@/entities/merchant/ui/merchant-tab';
import { RegistrationStatusWrap } from '@/entities/merchant/ui/registration-status-wrap';
import { MerchantTabKeys } from '@/entities/merchant/model/types';
import { HeaderType } from '@/entities/common/model/types';
import { 
	useSetHeaderTitle,
	useSetHeaderType,
	useSetFooterMode,
  useSetOnBack
} from '@/widgets/sub-layout/use-sub-layout';

export const RegistrationStatusPage = () => {
  const { navigate } = useNavigate();
  
  const [activeTab, setActiveTab] = useState<MerchantTabKeys>(MerchantTabKeys.RegistrationStatus);

  useSetHeaderTitle('가맹점 관리');
  useSetHeaderType(HeaderType.LeftArrow);
  useSetFooterMode(false);
  useSetOnBack(() => {
    navigate(PATHS.home);
  });

  return (
    <>
      <main>
        <div className="tab-content">
          <div className="tab-pane pt-46 active">
            <MerchantTab activeTab={ activeTab }></MerchantTab>
            <RegistrationStatusWrap></RegistrationStatusWrap>
          </div>
        </div>
      </main>
    </>
  );
};