import React from "react";
import ChangePasswordLoading from "./ChangePasswordLoading";
import ChangePassword from "./ChangePassword";
import { fetchPwRules } from "@/app/api/user";

interface SubComponents {
  Loading: typeof ChangePasswordLoading;
} 

const ChangePasswordWrapper: React.FC & SubComponents = async () => {
  const pwRules = await fetchPwRules()
  return <ChangePassword pwRules={pwRules}/>;
};

ChangePasswordWrapper.Loading = ChangePasswordLoading;

export default ChangePasswordWrapper;
