import{r as m,R as o}from"./index.9be5fb1a.js";import{I as f}from"./30205710.js";import{V as s}from"./b84f6150.js";import{ModelViewer as E}from"./7cc0a16d.js";function p(r,e){if(e==null)return r;const n=Object.keys(e).reduce((t,a)=>{const l=e[a];return l==null?t:t+`&${a}=${l}`},"");return`${r}?${n}`}function w(r,e){return m.exports.useMemo(()=>e?p(r,e):r,[r,e])}function y(r){const{data:e,options:n,id:t=e.id,frameBorder:a="0",allow:l="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:i=!0,loading:d="lazy",...c}=r;if(!e.embedUrl)throw new Error("<ExternalVideo/> requires the 'embedUrl' property");const u=w(e.embedUrl,n);return o.createElement("iframe",{...c,id:t!=null?t:e.embedUrl,frameBorder:a,allow:l,allowFullScreen:i,src:u,loading:d})}function M({data:r,options:e,...n}){switch(r.mediaContentType){case"IMAGE":{const t=r.image;return!t||!t.url?(console.warn(`No "image" property was found on the "data" prop for <MediaFile/>, for the "type='image'"`),null):o.createElement(f,{...n,data:t,loaderOptions:e})}case"VIDEO":return o.createElement(s,{...n,data:r,previewImageOptions:e});case"EXTERNAL_VIDEO":return o.createElement(y,{...n,data:r,options:e});case"MODEL_3D":return o.createElement(E,{...n,data:r});default:return null}}export{M}; //# sourceMappingURL=132ab464.js.map