"use client";

import { useSignup } from "@/hooks/useSignup";
import { LoginHeader } from "@/components/auth/LoginHeader";
import { SignupForm } from "@/components/auth/SignupForm";
import { LoginFooter } from "@/components/auth/LoginFooter";

/**
 * 회원가입 페이지 컴포넌트
 */
export default function SignupPage() {
  const {
    formData,
    isLoading,
    error,
    showPassword,
    validationErrors,
    touchedFields,
    isFormValid,
    handleInputChange,
    handleBlur,
    handleSignup,
    togglePasswordVisibility,
  } = useSignup();

  return (
    <div className="flex min-h-screen items-center justify-center bg-gradient-to-br from-slate-50 to-slate-100 p-4">
      <div className="w-full max-w-md space-y-8">
        <LoginHeader />

        <SignupForm
          formData={formData}
          isLoading={isLoading}
          error={error}
          showPassword={showPassword}
          validationErrors={validationErrors}
          touchedFields={touchedFields}
          isFormValid={isFormValid}
          onInputChange={handleInputChange}
          onBlur={handleBlur}
          onSubmit={handleSignup}
          onTogglePassword={togglePasswordVisibility}
        />

        <LoginFooter />
      </div>
    </div>
  );
}
