$entity =
match ($entityName) { ProductDefinition::ENTITY_NAME =>
$this->productRepository->
search($criteria,
$context->
getContext())->
first(),
LandingPageDefinition::ENTITY_NAME =>
$this->landingPageRepository->
search($criteria,
$context->
getContext())->
first(),
default =>
$this->categoryRepository->
search($criteria,
$context->
getContext())->
first(),
};
if (!
$entity) { return $mailConfigs;
} if (empty($entity->
getSlotConfig()[$slotId])) { return $mailConfigs;
} $mailConfigs['receivers'
] =
$entity->
getSlotConfig()[$slotId]['mailReceiver'
]['value'
];
$mailConfigs['message'
] =
$entity->
getSlotConfig()[$slotId]['confirmationText'
]['value'
];
return $mailConfigs;
} /**
* @return array<string, array<string, array<int, mixed>|bool|float|int|string|null>|string|mixed>
*/