import type { ServiceUserUserInfoData } from '@/client';
import { useUpdateUser } from '@/hooks/data/useUpdateUser';
import { EditProfileDialogView } from './edit-profile.dialog.view';

export function EditProfileDialogContainer({ data }: { data: ServiceUserUserInfoData }) {
  const { mutateAsync } = useUpdateUser();
  return (
    <EditProfileDialogView
      user={data}
      updateProfile={async (data) => {
        await mutateAsync({ body: data });
      }}
    />
  );
}
