import { useTopBarPage } from '@/business/top-bar/hooks';
import type { TopBarProps } from '@/business/top-bar/types';
import { TopBarView } from '@/components/top-bar/TopBarView';
import { useAuth } from '@/contexts/useAuth';

const TopBar = (props: TopBarProps) => {
  const { profile, signOut } = useAuth();
  const page = useTopBarPage({
    ...props,
    profile,
    signOut,
  });

  return <TopBarView page={page} />;
};

export default TopBar;
