import { manageWebsiteAction } from "@/components/shell/actions";
import { buttonClass } from "@/components/ui/button";

/**
 * Opens the website in the Admin dashboard (dashboard home, with every module). The caller stays a super admin:
 * only the active website changes, never the role.
 */
export function ManageWebsite({ siteId, siteName }: { siteId: string; siteName: string }) {
  return (
    <form action={manageWebsiteAction} aria-label={`Edit ${siteName}`}>
      <input type="hidden" name="siteId" value={siteId} />
      <input type="hidden" name="area" value="" />
      <button type="submit" aria-label={`Edit ${siteName}`} className={buttonClass("secondary")}>Edit</button>
    </form>
  );
}
