"use client" import { OrgSettingsSection } from "@/components/admin/settings/org-settings-form" import { IdentityProvidersSection } from "@/components/admin/settings/sections/identity-providers-section" import { DeployLockedHint, useDeployFieldLocked } from "@/components/admin/settings/deploy-locked-hint" import { useOrgSettingsStore } from "@/lib/admin-settings/org-settings-store" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { Switch } from "@/components/ui/switch" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" export function AuthenticationSection() { const authentik = useOrgSettingsStore((s) => s.authentik) const setAuthentik = useOrgSettingsStore((s) => s.setAuthentik) const effective = useOrgSettingsStore((s) => s.meta?.effective.authentik) const enabledLocked = useDeployFieldLocked("authentik", "enabled") const apiLocked = useDeployFieldLocked("authentik", "api_url") const clientLocked = useDeployFieldLocked("authentik", "client_id") const enabled = enabledLocked ? (effective?.enabled ?? authentik.enabled) : authentik.enabled const apiURL = apiLocked ? (effective?.api_url ?? authentik.api_url) : authentik.api_url const clientID = clientLocked ? (effective?.client_id ?? authentik.client_id) : authentik.client_id return (