import { useState } from 'react';
import { PATHS } from '@/shared/constants/paths';
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
import { BusinessMemberTab } from '@/entities/business-member/ui/business-member-tab';
import { InfoWrap } from '@/entities/business-member/ui/info-wrap';
import { BusinessMemberTabKeys } from '@/entities/business-member/model/types'; 
import { HeaderType } from '@/entities/common/model/types';
import { 
	useSetHeaderTitle,
	useSetHeaderType,
	useSetFooterMode,
  useSetOnBack
} from '@/widgets/sub-layout/use-sub-layout';

export const InfoPage = () => {
  const { navigate } = useNavigate();
  
  const [activeTab, setActiveTab] = useState<BusinessMemberTabKeys>(BusinessMemberTabKeys.Info);

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

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