'use client';

/**
 * 계좌 등록 페이지 - AccountDetailForm 적용
 */

import { AccountDetailForm } from '@/components/settings/AccountManagement/AccountDetailForm';
import { createBankAccount } from '@/components/settings/AccountManagement/actions';
import type { AccountFormData } from '@/components/settings/AccountManagement/types';

export default function NewAccountPage() {
  const handleSubmit = async (data: AccountFormData) => {
    const result = await createBankAccount(data);
    return { success: result.success, error: result.error };
  };

  return <AccountDetailForm mode="create" onSubmit={handleSubmit} />;
}
