/** * The company document set a company resolves to — one of three, never a * combination: a co-operative union or farm uploads its own papers INSTEAD of * its nationality's (it holds no business licence), and is always Ethiopian. * * Mirrors `CompaniesService.documentSettingCodeFor` on the API; prefer the * server-resolved `documentSettingCode` from onboarding requirements where one * is available, and use this where only the company is at hand. */ export function documentSettingCode( nationality: string | null | undefined, cooperative?: boolean | null, ): string { if (cooperative) return "company_onboarding_documents_cooperative"; return nationality === "foreign" ? "company_onboarding_documents_foreign" : "company_onboarding_documents_ethiopian"; }