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] = "8c1e22ef-3d58-4501-8175-4576b18f7f87", e._sentryDebugIdIdentifier = "sentry-dbid-8c1e22ef-3d58-4501-8175-4576b18f7f87");
} catch (e) {}
import { t as CountryCodes } from "./country-code-D3oCpE4i.js";
import { t as KEYBOARD_KEYS } from "./keys-C4gD4IDn.js";
import { a as validateNotEmptyOnBlur, i as validateLegalCompanyName, r as validateLatinSpaceMarkPunctuationNumbersOnlyOnBlur } from "./patternValidators-DMnU4iGe.js";
import { t as Field } from "./Field-BEqknhTe.js";
import { t as InputText } from "./InputText-CadVntiC.js";
import { jsx } from "preact/jsx-runtime";
//#region src/components/Shared/fields/LegalCompanyNameField/fieldConfig.ts
var defaultFieldMetadata = {
	label: "legalCompanyName",
	validators: validateNotEmptyOnBlur
};
var defaultFieldConfig = {
	[CountryCodes.Australia]: {
		label: "legalCompanyName",
		validators: validateNotEmptyOnBlur
	},
	[CountryCodes.HongKong]: {
		label: "legalCompanyName",
		validators: validateNotEmptyOnBlur
	},
	[CountryCodes.Netherlands]: {
		label: "legalCompanyName",
		validators: validateNotEmptyOnBlur
	},
	[CountryCodes.Singapore]: {
		label: "legalCompanyName",
		validators: validateNotEmptyOnBlur
	},
	[CountryCodes.UnitedStates]: {
		label: "legalCompanyName",
		validators: validateNotEmptyOnBlur
	}
};
var defaultFieldMetadataV4 = {
	label: "legalCompanyName",
	validators: validateLegalCompanyName
};
var defaultFieldConfigV4 = {
	[CountryCodes.Australia]: {
		label: "legalCompanyName",
		validators: validateLegalCompanyName
	},
	[CountryCodes.HongKong]: {
		label: "legalCompanyName",
		validators: validateLegalCompanyName
	},
	[CountryCodes.Netherlands]: {
		label: "legalCompanyName",
		validators: validateLegalCompanyName
	},
	[CountryCodes.Singapore]: {
		label: "legalCompanyName",
		validators: validateLegalCompanyName
	},
	[CountryCodes.UnitedStates]: {
		label: "legalCompanyName",
		validators: validateLegalCompanyName
	},
	[CountryCodes.Japan]: {
		label: "legalCompanyName__JP",
		validators: [...validateLegalCompanyName, validateLatinSpaceMarkPunctuationNumbersOnlyOnBlur]
	}
};
/**
* Returns the guidance text for the legal company name field based on country.
*/
var getLegalCompanyNameGuidanceText = (t, { country }) => {
	switch (country) {
		case CountryCodes.Australia: return t(($) => $["legalCompanyName__guidanceText__AU"]);
		case CountryCodes.HongKong: return t(($) => $["legalCompanyName__guidanceText__HK"]);
		case CountryCodes.Netherlands: return t(($) => $["legalCompanyName__guidanceText__NL"]);
		case CountryCodes.Singapore: return t(($) => $["legalCompanyName__guidanceText__SG"]);
		case CountryCodes.UnitedStates: return t(($) => $["legalCompanyName__guidanceText__US"]);
		default: return t(($) => $["legalCompanyName__guidanceText"]);
	}
};
//#endregion
//#region src/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.tsx
var LEGAL_COMPANY_NAME_FIELD = ["legalCompanyName"];
function LegalCompanyNameField({ data, valid, errors, labels, guidance, readonly, handleChangeFor }) {
	const handleKeyDown = (e) => {
		if (e.key === KEYBOARD_KEYS.enter) e.preventDefault();
	};
	return /* @__PURE__ */ jsx(Field, {
		name: "legalCompanyName",
		label: labels.legalCompanyName,
		formatGuidance: guidance,
		errorMessage: errors.legalCompanyName,
		isValid: valid.legalCompanyName,
		children: (childProps) => /* @__PURE__ */ jsx(InputText, {
			...childProps,
			"aria-required": true,
			"aria-invalid": !valid.legalCompanyName,
			name: "legalCompanyName",
			value: data.legalCompanyName,
			readonly,
			onInput: handleChangeFor("legalCompanyName", "input"),
			onBlur: handleChangeFor("legalCompanyName", "blur"),
			onKeyDown: handleKeyDown
		})
	});
}
//#endregion
export { defaultFieldMetadata as a, defaultFieldConfigV4 as i, LegalCompanyNameField as n, defaultFieldMetadataV4 as o, defaultFieldConfig as r, getLegalCompanyNameGuidanceText as s, LEGAL_COMPANY_NAME_FIELD as t };
