"use client";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useCallback } from "react";
import { OrgProfilePanel } from "../organization/OrgProfilePanel";
import { useOrg } from "../organization/OrgProvider";
/** Settings section for editing the active organization profile. */
export function OrgProfileSection() {
    const { activeOrg, refresh } = useOrg();
    const orgId = activeOrg?.metadata?.id ?? "";
    const handleUpdated = useCallback((org) => {
        refresh(org.metadata?.slug);
    }, [refresh]);
    return (_jsxs("section", { "aria-labelledby": "org-profile-heading", children: [_jsx("h2", { id: "org-profile-heading", className: "text-foreground mb-1 text-sm font-semibold", children: "Organization Profile" }), _jsx("p", { className: "text-muted-foreground mb-6 text-xs", children: "Manage your organization's display name, description, and logo." }), !orgId ? (_jsx("p", { className: "text-muted-foreground py-4 text-center text-xs", children: "Select an organization to view its profile." })) : (_jsx(OrgProfilePanel, { orgId: orgId, onUpdated: handleUpdated }))] }));
}
//# sourceMappingURL=OrgProfileSection.js.map