try {
	let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
	n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "37986caa-4f5e-4a43-aa87-7fb45267ebea", e._sentryDebugIdIdentifier = "sentry-dbid-37986caa-4f5e-4a43-aa87-7fb45267ebea");
} catch (e) {}
import { c as __exportAll, i as Typography, n as addResourceBundles, r as useTranslation } from "./translation-Br5wIPO-.js";
import { r as Loader, t as Button } from "./Button-BDEdGXnd.js";
import { r as useLegalEntity, t as ROOT_LE } from "./useLegalEntity-Dm6g0wmt.js";
import { t as useToggleContext } from "./useToggleContext-CLfowItk.js";
import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-CCXvMgfE.js";
import { t as StackLayout } from "./StackLayout-BMQXXBDb.js";
import { t as TaskVerificationStatus } from "./TaskVerificationStatus-jBBIJN_A.js";
import { i as TaskStatuses } from "./taskStatus-CvMqhrOK.js";
import { t as Header } from "./Header-B_MIsVov.js";
import { t as Alert } from "./Alert-CjZYipjN.js";
import { C as EntityTypes, T as DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING } from "./processCapabilities-CDSEJpB8.js";
import { t as TaskTypes } from "./taskTypes-DWaxzvnQ.js";
import { r as useGetTaskStatus } from "./globalStore-D0yv1fc_.js";
import { t as DecisionMakerTypes } from "./decision-maker-type-DHBYiKIe.js";
import { r as getOwnDecisionMakers } from "./decisionMakerRoles-wy4KpDQg.js";
import { t as useAnalyticsContext } from "./useAnalyticsContext-DfTXpZbA.js";
import { t as useToastContext } from "./useToastContext-CK7UoZ5Z.js";
import { t as useDataMissingRemediations } from "./useDataMissingRemediations-Ddj2bl69.js";
import { n as useCapabilityProblems } from "./getProblemsForEntity-COcJt47f.js";
import { t as Modal } from "./Modal-DOC6JgPI.js";
import { t as Image } from "./Image-BPAtdM5Y.js";
import { a as individualFormDefaultData, i as GuidanceQuestionValues } from "./mapLegalEntityToIndividualSchema-BMvlasSJ.js";
import { t as useUpdateLegalEntity } from "./useUpdateLegalEntity-CUs6TYPF.js";
import { t as List } from "./List-DLrcpMVd.js";
import { t as useTaskLandedEvent } from "./useTaskLandedEvent-DCdJo64z.js";
import { t as LandingLayout } from "./LandingLayout-C9eryD6V.js";
import { t as ListItem } from "./ListItem-ByYbZdGG.js";
import { i as useInvitationStatuses, n as getDecisionMakerDescription, t as DecisionMakerDetails } from "./DecisionMakerDetails-DElp9pZu.js";
import { lazy } from "preact/compat";
import { useEffect as useEffect$1, useMemo as useMemo$1, useState as useState$1 } from "preact/hooks";
import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
//#region src/utils/not.ts
/**
* Inverts a boolean function. Very useful to use with {@link Array.filter}.
*
* E.g.
* ```typescript
* // this:
* const nonHumans = animals.filter(a => !isHuman(a));
* // becomes:
* const nonHumans = animals.filter(not(isHuman));
* ```
*/
var not = (fn) => (...args) => !fn(...args);
//#endregion
//#region src/components/Individual/tasks/DecisionMakers/DecisionMakerListItem/DecisionMakerListItem.tsx
function DecisionMakerListItem({ decisionMaker, openDecisionMakerModal, hasActiveInvitation }) {
	const { t: individualT } = useTranslation("individual");
	const description = getDecisionMakerDescription(decisionMaker.types, individualT);
	return /* @__PURE__ */ jsx(ListItem, {
		accessory: /* @__PURE__ */ jsx(TaskVerificationStatus, { status: decisionMaker.status === "DETAILS_REQUIRED" && hasActiveInvitation ? "inviteSent" : decisionMaker.status }),
		avatar: {
			iconName: hasActiveInvitation ? "payByLinkPlane" : "user",
			circle: true
		},
		title: decisionMaker.name,
		action: {
			onClick: () => openDecisionMakerModal(decisionMaker),
			disclosure: true
		},
		description
	});
}
var DecisionMakersGettingStarted_module_default = {
	"decision-makers-getting-started": "adyen-kyc-decision-makers-getting-started",
	decisionMakersGettingStarted: "adyen-kyc-decision-makers-getting-started"
};
//#endregion
//#region src/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersModalContent.tsx
var DecisionMakersModalContent = () => {
	const { t } = useTranslation("individual");
	return /* @__PURE__ */ jsxs("div", {
		className: DecisionMakersGettingStarted_module_default.decisionMakersGettingStartedModal,
		children: [
			/* @__PURE__ */ jsx(Typography, {
				variant: "title-l",
				el: "h3",
				className: "u-margin-bottom-40",
				children: t(($) => $["moreAboutOwnersAndDecisionMakers"])
			}),
			/* @__PURE__ */ jsx(Typography, {
				variant: "body-strongest",
				el: "h4",
				className: "u-margin-bottom-12",
				children: t(($) => $["ownersAndDecisionMakersDescriptionQ1"])
			}),
			/* @__PURE__ */ jsx(Typography, {
				el: "p",
				className: "u-margin-bottom-32",
				children: t(($) => $["ownersAndDecisionMakersDescriptionA1"])
			}),
			/* @__PURE__ */ jsx(Alert, {
				title: t(($) => $["ownersDescriptionAlertTitle"]),
				icon: false,
				className: "u-margin-bottom-32",
				children: t(($) => $["ownersAndDecisionMakersDescriptionAlertContent"])
			}),
			/* @__PURE__ */ jsx(Typography, {
				variant: "body-strongest",
				el: "h4",
				className: "u-margin-bottom-12",
				children: t(($) => $["ownersAndDecisionMakersDescriptionQ2"])
			}),
			/* @__PURE__ */ jsx(Typography, {
				el: "p",
				children: t(($) => $["ownersAndDecisionMakersDescriptionA2P1"])
			}),
			/* @__PURE__ */ jsx(Typography, {
				el: "p",
				className: "u-margin-bottom-32",
				children: t(($) => $["ownersAndDecisionMakersDescriptionA2P2"])
			}),
			/* @__PURE__ */ jsx(Alert, {
				title: t(($) => $["ownersDescriptionAlertTitle"]),
				icon: false,
				className: "u-margin-bottom-32",
				children: t(($) => $["ownersDescriptionAlertContent"])
			}),
			/* @__PURE__ */ jsx(Typography, {
				variant: "body-strongest",
				el: "h4",
				className: "u-margin-bottom-12",
				children: t(($) => $["ownersAndDecisionMakersDescriptionQ3"])
			}),
			/* @__PURE__ */ jsx(Typography, {
				el: "p",
				className: "u-margin-bottom-32",
				children: t(($) => $["ownersAndDecisionMakersDescriptionA3"])
			}),
			/* @__PURE__ */ jsx(Typography, {
				variant: "body-strongest",
				el: "h4",
				className: "u-margin-bottom-12",
				children: t(($) => $["ownersAndDecisionMakersDescriptionQ4"])
			}),
			/* @__PURE__ */ jsx(Typography, {
				el: "p",
				className: "u-margin-bottom-32",
				children: t(($) => $["ownersAndDecisionMakersDescriptionA4"])
			})
		]
	});
};
//#endregion
//#region src/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersGettingStarted.tsx
var decisionMakerGroup = lazy(() => import("./decision-makers-group-CkP3dlRO.js"));
var DecisionMakersGettingStarted = ({ addDecisionMakerOnClick, handleCancelClick }) => {
	const { t: commonT } = useTranslation("common");
	const { t: individualT } = useTranslation("individual");
	const userEvents = useAnalyticsContext();
	const [isModalOpen, setIsModalOpen] = useState$1(false);
	const openModal = () => {
		userEvents.addPageEvent("Opened modal", {
			actionType: "open",
			label: "decisionMakersGettingStartedModal"
		});
		setIsModalOpen(true);
	};
	const closeModal = () => {
		userEvents.addPageEvent("Closed modal", {
			actionType: "close",
			label: "decisionMakersGettingStartedModal"
		});
		setIsModalOpen(false);
	};
	return /* @__PURE__ */ jsxs("div", {
		className: DecisionMakersGettingStarted_module_default.decisionMakersGettingStarted,
		children: [/* @__PURE__ */ jsx(LandingLayout, {
			media: /* @__PURE__ */ jsx(Image, { lazyLoadedImage: decisionMakerGroup }),
			title: individualT(($) => $["ownersAndDecisionMakers"]),
			description: individualT(($) => $["ownersAndDecisionMakersDescription"]),
			helpAction: /* @__PURE__ */ jsx(Button, {
				variant: "link",
				onClick: openModal,
				fullWidth: true,
				children: commonT(($) => $["learnMore"])
			}),
			actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
				fullWidth: true,
				testId: "decision-makers-getting-started-primary-button",
				onClick: addDecisionMakerOnClick,
				children: commonT(($) => $["getStarted"])
			}), handleCancelClick && /* @__PURE__ */ jsx(Button, {
				variant: "tertiary",
				fullWidth: true,
				testId: "decision-makers-getting-started-cancel-button",
				onClick: handleCancelClick,
				children: commonT(($) => $["finishLater"])
			})] })
		}), isModalOpen && /* @__PURE__ */ jsx(Modal, {
			onClose: closeModal,
			ariaLabel: individualT(($) => $["moreAboutOwnersAndDecisionMakers"]),
			inset: true,
			children: /* @__PURE__ */ jsx(DecisionMakersModalContent, {})
		})]
	});
};
var decisionMakerRemediationAlerts = [{
	type: "single",
	code: "2_124",
	titleKey: "authorizedSignatoryMissing",
	descriptionKey: "addAtLeastOneAuthorizedSignatory",
	actionKey: "addAuthorizedSignatory"
}, {
	type: "grouped",
	codes: [
		"2_123",
		"2_151",
		"2_185"
	],
	titleKey: "beneficialOwnersMissing",
	actionKey: "addBeneficialOwner",
	detailKeys: {
		"2_123": "addAllBeneficialOwners",
		"2_151": "addAtLeastOneBeneficialOwnerControllingPerson",
		"2_185": "addAtLeastOneDirector"
	}
}];
//#endregion
//#region src/components/Individual/tasks/DecisionMakers/RemediationAlerts/RemediationAlerts.tsx
var RemediationAlertItem = ({ config, activeCodes, onAction }) => {
	const { t } = useTranslation("individual");
	const isVisible = useMemo$1(() => {
		if (config.type === "single") return activeCodes.includes(config.code);
		return config.codes.some((code) => activeCodes.includes(code));
	}, [activeCodes, config]);
	const activeGroupedDetails = useMemo$1(() => {
		if (config.type !== "grouped") return [];
		return config.codes.filter((code) => activeCodes.includes(code)).map((code) => config.detailKeys[code]);
	}, [activeCodes, config]);
	if (!isVisible) return null;
	return /* @__PURE__ */ jsxs(Alert, {
		className: "adyen-kyc-decision-makers__warning",
		title: t(($) => $[config.titleKey]),
		variant: "warning",
		children: [
			config.type === "single" && /* @__PURE__ */ jsx("p", { children: t(($) => $[config.descriptionKey]) }),
			config.type === "grouped" && (activeGroupedDetails.length > 1 ? /* @__PURE__ */ jsx("ul", { children: activeGroupedDetails.map((key) => /* @__PURE__ */ jsx("li", { children: t(($) => $[key]) }, key)) }) : /* @__PURE__ */ jsx("p", { children: t(($) => $[activeGroupedDetails[0]]) })),
			/* @__PURE__ */ jsx(Button, {
				variant: "link",
				onClick: onAction,
				children: t(($) => $[config.actionKey])
			})
		]
	});
};
var RemediationAlerts = ({ activeCodes, onAction }) => /* @__PURE__ */ jsx(Fragment$1, { children: decisionMakerRemediationAlerts.map((config) => /* @__PURE__ */ jsx(RemediationAlertItem, {
	config,
	activeCodes,
	onAction
}, config.type === "single" ? config.code : config.titleKey)) });
//#endregion
//#region src/components/Individual/tasks/DecisionMakers/DecisionMakers.tsx
var DecisionMakers_exports = /* @__PURE__ */ __exportAll({ DecisionMakers: () => DecisionMakers });
/**
* Decision makers are part of the Organization flow, that allow the creation
* of a type of Individual, the decision maker, so a variation of the individual flow
* is used to create a decision maker via this component.
*/
var DecisionMakers = (props) => {
	const { data, isLoading } = useLegalEntity(ROOT_LE);
	const { i18n } = useTranslation();
	addResourceBundles(i18n, [{
		ns: "individual",
		importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({
			"../../language/bg-BG.json": () => import("./bg-BG-CS6SQDE2.js"),
			"../../language/cs-CZ.json": () => import("./cs-CZ-C-nfIYKA.js"),
			"../../language/da-DK.json": () => import("./da-DK-DO88W3qD.js"),
			"../../language/de-DE.json": () => import("./de-DE-YX6rtv17.js"),
			"../../language/el-GR.json": () => import("./el-GR-Be15a5W8.js"),
			"../../language/en-US.instructions.json": () => import("./en-US.instructions-CXa3foCe.js"),
			"../../language/en-US.json": () => import("./en-US-BDZwHN0Y.js"),
			"../../language/es-ES.json": () => import("./es-ES-D1BkDJkz.js"),
			"../../language/et-EE.json": () => import("./et-EE-BZ26f0MN.js"),
			"../../language/fi-FI.json": () => import("./fi-FI-CeJPt0gg.js"),
			"../../language/fr-FR.json": () => import("./fr-FR-lfoSPY0e.js"),
			"../../language/hr-HR.json": () => import("./hr-HR-CMgsuYh2.js"),
			"../../language/hu-HU.json": () => import("./hu-HU-C0Y9wmOY.js"),
			"../../language/it-IT.json": () => import("./it-IT-Cm3ujfY_.js"),
			"../../language/ja-JP.json": () => import("./ja-JP-BbXt47jb.js"),
			"../../language/lt-LT.json": () => import("./lt-LT-CDdoDT7A.js"),
			"../../language/lv-LV.json": () => import("./lv-LV-DpfhFur0.js"),
			"../../language/nl-NL.json": () => import("./nl-NL-B0uwKjKV.js"),
			"../../language/no-NO.json": () => import("./no-NO-BlsDONGK.js"),
			"../../language/pl-PL.json": () => import("./pl-PL-Ct3cI8Sk.js"),
			"../../language/pt-BR.json": () => import("./pt-BR-CqDjOIYt.js"),
			"../../language/pt-PT.json": () => import("./pt-PT-Dl_yfKGH.js"),
			"../../language/ro-RO.json": () => import("./ro-RO-D9YjxrDi.js"),
			"../../language/sk-SK.json": () => import("./sk-SK-CQ1N3c8X.js"),
			"../../language/sl-SI.json": () => import("./sl-SI-B8-rZ169.js"),
			"../../language/sv-SE.json": () => import("./sv-SE-guJk9E1n.js")
		}), `../../language/${lang}.json`, 4)
	}]);
	if (isLoading || !data) return /* @__PURE__ */ jsx(Loader, {});
	return /* @__PURE__ */ jsx(DecisionMakersInner, {
		...props,
		legalEntity: data
	});
};
/** Inner component that has all the data loaded/non-undefined */
var DecisionMakersInner = ({ legalEntity, onNavigateToIndividual, navigateBackToTaskList }) => {
	const getTaskStatus = useGetTaskStatus();
	const { t: commonT } = useTranslation("common");
	const { t: individualT } = useTranslation("individual");
	const userEvents = useAnalyticsContext();
	const { isFeatureEnabled } = useToggleContext();
	const { showToast } = useToastContext();
	const [showDecisionMakerModal, setShowDecisionMakerModal] = useState$1(false);
	const [selectedDecisionMaker, setSelectedDecisionMaker] = useState$1();
	const [isModalOpen, setIsModalOpen] = useState$1(false);
	const openModal = () => {
		userEvents.addPageEvent("Opened modal", {
			actionType: "open",
			label: "decisionMakersDescriptionModal"
		});
		setIsModalOpen(true);
	};
	const closeModal = () => {
		userEvents.addPageEvent("Closed modal", {
			actionType: "close",
			label: "decisionMakersDescriptionModal"
		});
		setIsModalOpen(false);
	};
	const openDecisionMakerModal = (decisionMaker) => {
		userEvents.addPageEvent("Opened modal", {
			actionType: "open",
			label: "viewDecisionMakerModal"
		});
		setShowDecisionMakerModal(true);
		setSelectedDecisionMaker(decisionMaker);
	};
	const closeDecisionMakerModal = () => {
		userEvents.addPageEvent("Closed modal", {
			actionType: "close",
			label: "viewDecisionMakerModal"
		});
		setShowDecisionMakerModal(false);
		setSelectedDecisionMaker(null);
	};
	const capabilityProblems = useCapabilityProblems();
	const decisionMakerRemediationCodes = useMemo$1(() => {
		const remediationCodes = (capabilityProblems?.[EntityTypes.LEGAL_ENTITY]?.[legalEntity.id]?.missingData ?? []).flatMap((error) => {
			const remediation = DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING[error.code];
			return remediation ? [remediation] : [];
		});
		return [...new Set(remediationCodes)];
	}, [capabilityProblems, legalEntity.id]);
	const updateLegalEntity = useUpdateLegalEntity();
	const decisionMakers = getOwnDecisionMakers(legalEntity);
	const translationKeys = { home: "goBackToTaskList" };
	const { remediationMessages } = useDataMissingRemediations({
		legalEntityId: legalEntity.id,
		problems: capabilityProblems ?? {}
	});
	const mappedDecisionMakers = decisionMakers?.reduce((mappedDecisionMakers, decisionMaker) => {
		if (!decisionMaker.legalEntityId) return mappedDecisionMakers;
		const mappedDecisionMaker = mappedDecisionMakers[decisionMaker.legalEntityId];
		const decisionMakerType = decisionMaker.type;
		mappedDecisionMakers[decisionMaker.legalEntityId] = {
			reference: decisionMaker.legalEntityId,
			types: mappedDecisionMaker ? [...mappedDecisionMaker.types, decisionMakerType] : [decisionMakerType],
			status: getTaskStatus(TaskTypes.DECISION_MAKER, decisionMaker.legalEntityId),
			name: decisionMaker.name ?? "",
			legalEntityType: decisionMaker.entityType,
			problems: capabilityProblems?.LegalEntity?.[decisionMaker.legalEntityId]
		};
		return mappedDecisionMakers;
	}, {});
	const uniqueDecisionMakers = mappedDecisionMakers ? Object.values(mappedDecisionMakers) : [];
	const isVerifyByInviteEnabled = isFeatureEnabled("EnableVerifyByInvite");
	const invitationsStatuses = useInvitationStatuses(uniqueDecisionMakers.map((dm) => dm.reference), { enabled: isVerifyByInviteEnabled });
	const hasActiveInvitation = (dm) => invitationsStatuses[dm.reference];
	const isWaitingForInvitee = (dm) => dm.status === TaskStatuses.DETAILS_REQUIRED && hasActiveInvitation(dm);
	const isActionNeeded = (dm) => (dm.status === TaskStatuses.ERROR || dm.status === TaskStatuses.DETAILS_REQUIRED) && !isWaitingForInvitee(dm);
	const isComplete = (dm) => dm.status === TaskStatuses.FINISHED || dm.status === TaskStatuses.PROCESSING || isWaitingForInvitee(dm);
	const isSignatory = (dm) => dm.types.includes(DecisionMakerTypes.SIGNATORY);
	const actionNeededDecisionMakers = uniqueDecisionMakers.filter(isActionNeeded);
	const completeDecisionMakers = uniqueDecisionMakers.filter(isComplete);
	const actionNeededSignatories = actionNeededDecisionMakers.filter(isSignatory);
	const actionNeededBeneficialOwners = actionNeededDecisionMakers.filter(not(isSignatory));
	const completeSignatories = completeDecisionMakers.filter(isSignatory);
	const completeBeneficialOwners = completeDecisionMakers.filter(not(isSignatory));
	const showWarning = Boolean(remediationMessages.DECISION_MAKER && uniqueDecisionMakers.length);
	/**
	* Analytics
	*/
	useTaskLandedEvent("DECISION_MAKER_OVERVIEW");
	useEffect$1(() => {
		if (showWarning) userEvents.addTaskEvent("Encountered error", {
			task: TaskTypes.DECISION_MAKER_OVERVIEW,
			actionType: "alert",
			returnValue: "missingDecisionMaker"
		});
	}, [
		remediationMessages.DECISION_MAKER,
		showWarning,
		userEvents
	]);
	const getDecisionMakerTrackingParams = (decisionMaker) => ({
		task: TaskTypes.DECISION_MAKER_OVERVIEW,
		associatedLegalEntityId: decisionMaker.reference,
		associatedLegalEntityType: decisionMaker.legalEntityType,
		roles: decisionMaker.types
	});
	const addDecisionMakerOnClick = () => {
		onNavigateToIndividual();
	};
	const onRemediationAction = () => {
		const SIGNATORY_MISSING_CODE = "2_124";
		const DIRECTOR_MISSING_CODE = "2_185";
		if (decisionMakerRemediationCodes.length === 1) switch (decisionMakerRemediationCodes[0]) {
			case SIGNATORY_MISSING_CODE:
				individualFormDefaultData.value = { signatoryQuestionnaire: { isSignatory: GuidanceQuestionValues.YES } };
				break;
			case DIRECTOR_MISSING_CODE:
				individualFormDefaultData.value = { uboQuestionnaire: {
					isDirector: GuidanceQuestionValues.YES,
					isOwner: null,
					isControllingPerson: null
				} };
				break;
			default: break;
		}
		onNavigateToIndividual();
	};
	const editDecisionMaker = (decisionMaker) => {
		onNavigateToIndividual(decisionMaker.reference);
		userEvents.addTaskEvent("Clicked button", {
			...getDecisionMakerTrackingParams(decisionMaker),
			actionType: "edit"
		});
	};
	const deleteDecisionMaker = async (decisionMaker) => {
		try {
			const updatedEntityAssociations = { entityAssociations: (legalEntity.entityAssociations ?? []).filter((entityAssociation) => entityAssociation.legalEntityId !== decisionMaker.reference) };
			await updateLegalEntity.mutateAsync({
				...updatedEntityAssociations,
				id: legalEntity.id
			});
			const remainingDecisionMakers = decisionMakers.filter((curr) => curr.legalEntityId !== decisionMaker.reference);
			userEvents.addTaskEvent("Clicked button", {
				...getDecisionMakerTrackingParams(decisionMaker),
				actionType: "remove",
				remainingDecisionMakers
			});
			showToast({
				variant: "success",
				label: individualT(($) => $["successFullyRemovedDecisionMaker"])
			});
			closeDecisionMakerModal();
		} catch {
			showToast({
				variant: "error",
				label: individualT(($) => $["failedToRemoveDecisionMaker"])
			});
		}
	};
	const renderDecisionMakersList = (decisionMakers) => {
		if (decisionMakers.length === 0) return null;
		return /* @__PURE__ */ jsx(List, {
			variant: "grouped-primary",
			padding: "small",
			dividers: false,
			children: decisionMakers.map((decisionMaker) => /* @__PURE__ */ jsx(DecisionMakerListItem, {
				decisionMaker,
				openDecisionMakerModal,
				hasActiveInvitation: hasActiveInvitation(decisionMaker)
			}, decisionMaker.reference))
		});
	};
	const decisionMakerSections = useMemo$1(() => [{
		key: "actionNeeded",
		title: commonT(($) => $["actionNeeded"]),
		signatories: actionNeededSignatories,
		beneficialOwners: actionNeededBeneficialOwners
	}, {
		key: "complete",
		title: commonT(($) => $["complete"]),
		signatories: completeSignatories,
		beneficialOwners: completeBeneficialOwners
	}], [
		commonT,
		actionNeededSignatories,
		actionNeededBeneficialOwners,
		completeSignatories,
		completeBeneficialOwners
	]);
	if (uniqueDecisionMakers.length === 0) return /* @__PURE__ */ jsx(DecisionMakersGettingStarted, {
		handleCancelClick: () => navigateBackToTaskList(),
		addDecisionMakerOnClick
	});
	return /* @__PURE__ */ jsx("div", {
		className: "u-display-flex u-justify-content-center",
		children: /* @__PURE__ */ jsxs("div", {
			className: "adyen-kyc-decision-makers u-margin-32",
			children: [
				/* @__PURE__ */ jsxs(StackLayout, {
					gap: "medium",
					align: "center",
					children: [/* @__PURE__ */ jsx(Header, {
						title: individualT(($) => $["ownersAndDecisionMakers"]),
						description: individualT(($) => $["ownersAndDecisionMakersDescription"]),
						status: getTaskStatus(TaskTypes.DECISION_MAKER_OVERVIEW),
						align: "center",
						children: /* @__PURE__ */ jsx(Button, {
							slot: "actions",
							variant: "link",
							onClick: openModal,
							children: commonT(($) => $["learnMore"])
						})
					}), showWarning && /* @__PURE__ */ jsx(RemediationAlerts, {
						activeCodes: decisionMakerRemediationCodes,
						onAction: onRemediationAction
					})]
				}),
				/* @__PURE__ */ jsxs(StackLayout, {
					gap: "small",
					children: [
						decisionMakerSections.map((section) => {
							if (section.signatories.length === 0 && section.beneficialOwners.length === 0) return null;
							return /* @__PURE__ */ jsx(List, {
								padding: "none",
								dividers: false,
								header: section.title,
								children: /* @__PURE__ */ jsxs(StackLayout, {
									gap: "small",
									children: [renderDecisionMakersList(section.signatories), renderDecisionMakersList(section.beneficialOwners)]
								})
							}, section.key);
						}),
						/* @__PURE__ */ jsx(List, {
							variant: "grouped-primary",
							padding: "small",
							dividers: false,
							children: /* @__PURE__ */ jsx(ListItem, {
								avatar: {
									iconName: "plus",
									circle: true
								},
								title: isFeatureEnabled("EnableVerifyByInvite") ? individualT(($) => $["addNewOrInvite"]) : commonT(($) => $["addNew"]),
								action: { onClick: addDecisionMakerOnClick }
							})
						}),
						/* @__PURE__ */ jsx(Button, {
							variant: "secondary",
							onClick: () => {
								userEvents.addTaskEvent("Clicked button", {
									task: TaskTypes.DECISION_MAKER_OVERVIEW,
									actionType: "back",
									label: translationKeys.home,
									noOfDecisionMakers: decisionMakers.length
								});
								navigateBackToTaskList();
							},
							fullWidth: true,
							children: commonT(($) => $[translationKeys.home])
						})
					]
				}),
				showDecisionMakerModal && selectedDecisionMaker && /* @__PURE__ */ jsx(DecisionMakerDetails, {
					handleClose: closeDecisionMakerModal,
					handleDelete: () => deleteDecisionMaker(selectedDecisionMaker),
					handleEdit: () => editDecisionMaker(selectedDecisionMaker),
					decisionMaker: selectedDecisionMaker,
					parentLegalEntity: legalEntity
				}),
				isModalOpen && /* @__PURE__ */ jsx(Modal, {
					onClose: closeModal,
					ariaLabel: individualT(($) => $["moreAboutOwnersAndDecisionMakers"]),
					inset: true,
					children: /* @__PURE__ */ jsx(DecisionMakersModalContent, {})
				})
			]
		})
	});
};
//#endregion
export { DecisionMakers_exports as n, DecisionMakers as t };
