Adding bundle-specific expression branching support to `ReferenceFieldTypePropExpression`
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3550750. -->
Reported by: [vishalkhode](https://www.drupal.org/user/2439156)
Related to !539 !400 !198
>>>
<h3 id="overview">Overview</h3>
<ul>
<li><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/experience_builder/issues/3530521" title="Status: Closed (fixed)">#3530521: Decouple image shape matching from the `image` MediaType: support matching multiple bundles of a single MediaSources (`image`)</a></span> introduced multi-bundle support for references, with different field names per bundle.</li>
<li><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/experience_builder/issues/3530533" title="Status: Closed (fixed)">#3530533: Support image shape matching against multiple bundles of multiple MediaSources (`image` + `oembed` + `acquia_dam_asset` + …)</a></span> expanded this with per-bundle different field properties too.</li>
</ul>
<p>However, that's insufficient to meet all needs. </p>
<p>The polymorphic nature is more complicated for videos than for images, because:</p>
<ul>
<li>reference to a core <code>\Drupal\media\Plugin\media\Source\VideoFile</code> media type's video media (let's say there's 2 such media types): something like<br>
<pre>ℹ︎entity_reference␟{src↝entity␜␜entity:media:baby_videos|vacation_videos␝field_media_video_file|field_media_video_file_1␞␟entity␜␜entity:file␝uri␞␟url</pre></li><li>reference to an Acquia DAM video (<code>\Drupal\acquia_dam\Plugin\media\acquia_dam\Video</code>) media type, due to a different media source field, would need something like:<br>
ℹ︎␜entity:node:article␝field_video_media␞␟entity␜␜entity:media:video␝uri␞␟value
<pre>ℹ︎entity_reference␟{src↝entity␜␜entity:media:acquia_dam_video_asset␝ acquia_dam_video_item␞␟src</pre></li><li>We then need to COMBINE these, to allow an entity reference that allows picking from both Drupal's <code>VideoFile</code> and Acquia DAM's <code>acquia_dam\Video</code>. This is impossible to express.
</li></ul>
<h3 id="proposed-resolution">Proposed resolution</h3>
<p>Make it possible to express.</p>
<h3 id="ui-changes">User interface changes</h3>
<p>None.</p>
> Related issue: [Issue #3483017](https://www.drupal.org/node/3483017)
> Related issue: [Issue #3567249](https://www.drupal.org/node/3567249)
issue