\
assert(\
is_string($countryId) && Uuid::
isValid($countryId));
$criteria =
new Criteria([$countryId]);
$criteria->
setTitle('base-context-factory::country'
);
$country =
$this->countryRepository->
search($criteria,
$context)->
get($countryId);
if (!
$country instanceof CountryEntity
) { throw SalesChannelException::
countryNotFound($countryId);
} return ShippingLocation::
createFromCountry($country);
} /**
* @param array<string, mixed> $sessionOptions
* @param array<string> $availableLanguageIds
*
* @return non-empty-array<string>
*/
private function buildLanguageChain(array
$sessionOptions, string
$defaultLanguageId, array
$availableLanguageIds): array
{ $current =
$sessionOptions[SalesChannelContextService::LANGUAGE_ID
] ??
$defaultLanguageId;