"use client";

import { useRouter } from "next/navigation";
import { useInternetConfigure } from "@/features/catalog/hooks/useInternetConfigure";
import { InternetConfigureView } from "@/features/catalog/components/internet/InternetConfigureView";

export function InternetConfigureContainer() {
  const router = useRouter();
  const vm = useInternetConfigure();

  const handleConfirm = () => {
    const params = vm.buildCheckoutSearchParams();
    if (!params) return;
    router.push(`/checkout?${params.toString()}`);
  };

  return <InternetConfigureView {...vm} onConfirm={handleConfirm} />;
}
