;
{
  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] = "9efd2a32-1acf-4a48-83d3-a8f528f2976a", e._sentryDebugIdIdentifier = "sentry-dbid-9efd2a32-1acf-4a48-83d3-a8f528f2976a");
  } catch (e) {
  }
}
;
import { S as SettingNames } from "./TaskVerificationStatus-C19Z4x3D.js";
import { J as isPartOfTrustFromLegalEntity, M as hasSolePropInLegalEntity, o as LegalEntityTypes, B as useSettingsContext } from "./StoreProvider-CqQrndhS.js";
const 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 void 0;
  }
};
const 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;
  }
};
export {
  useLegalEntityType as a,
  useCanSeeIntroduction as u
};
