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] = "66dec4da-0ccf-42ac-94c1-2b1131891fa2", e._sentryDebugIdIdentifier = "sentry-dbid-66dec4da-0ccf-42ac-94c1-2b1131891fa2");
} catch (e) {}
import { t as LegalEntityTypes } from "./legal-entity-type-VIfNYnJP.js";
import { t as useSettingsContext } from "./useSettingsContext-DzwVt0W0.js";
import { f as hasSolePropInLegalEntity } from "./entityAssociationUtil-C0gX4Ewv.js";
import { o as isPartOfTrustFromLegalEntity } from "./trustUtil-CVipffas.js";
import { t as SettingNames } from "./types-BklAlvuU.js";
//#region src/hooks/useLegalEntityType.ts
var useLegalEntityType = ({ legalEntity }) => {
	const isTrust = isPartOfTrustFromLegalEntity(legalEntity);
	const isSoleProprietor = hasSolePropInLegalEntity(legalEntity);
	const hasLegalAssociation = isTrust || isSoleProprietor;
	switch (legalEntity.type) {
		case LegalEntityTypes.INDIVIDUAL:
		case LegalEntityTypes.ORGANIZATION:
			if (!hasLegalAssociation) return legalEntity.type;
			if (isSoleProprietor) return LegalEntityTypes.SOLE_PROPRIETORSHIP;
			if (isTrust) return LegalEntityTypes.TRUST;
			break;
		default: return;
	}
};
//#endregion
//#region src/hooks/introduction/useCanSeeIntroduction.ts
var useCanSeeIntroduction = ({ legalEntity }) => {
	const legalEntityType = useLegalEntityType({ legalEntity });
	const { isSettingEnabled } = useSettingsContext();
	switch (legalEntityType) {
		case LegalEntityTypes.INDIVIDUAL: return !isSettingEnabled(SettingNames.HideOnboardingIntroductionIndividual);
		case LegalEntityTypes.ORGANIZATION: return !isSettingEnabled(SettingNames.HideOnboardingIntroductionOrganization);
		case LegalEntityTypes.SOLE_PROPRIETORSHIP: return !isSettingEnabled(SettingNames.HideOnboardingIntroductionSoleProprietor);
		case LegalEntityTypes.TRUST: return !isSettingEnabled(SettingNames.HideOnboardingIntroductionTrust);
		default: return false;
	}
};
//#endregion
export { useLegalEntityType as n, useCanSeeIntroduction as t };
