import{i as e}from"./preload-helper-B45gAKPr.js";import{t}from"./iframe-NOj5DEP4.js";import{n,t as r}from"./ImageRenderer-Be0v064J.js";function i(e){return e.map(e=>`width`in e?`${e.src} ${e.width}w`:`${e.src} ${e.density}x`).join(`, `)}var a=e((()=>{}));function o(e,t){return(e??[]).map(e=>({srcSet:i(e.candidates),type:e.type,sizes:e.sizes??t})).filter(e=>e.srcSet.length>0)}var s=e((()=>{a()}));function c({image:e,alt:t,sizes:n,aspectRatio:a,...s}){let c=o(e.sources,n),u=e.candidates?i(e.candidates):void 0,d=a??(e.intrinsicWidth&&e.intrinsicHeight?`${e.intrinsicWidth} / ${e.intrinsicHeight}`:void 0);return(0,l.jsx)(r,{...s,src:e.src,srcSet:u||void 0,sources:c,sizes:n,alt:t??e.alt,intrinsicWidth:e.intrinsicWidth,intrinsicHeight:e.intrinsicHeight,aspectRatio:d})}var l,u=e((()=>{s(),a(),n(),l=t(),c.__docgenInfo={description:`Собирает picture/srcset из готовых URL и делегирует отображение ImageRenderer.
Компонент не формирует имена файлов и не знает о форматах или размерах хранилища.`,methods:[],displayName:`ImageView`,props:{image:{required:!0,tsType:{name:`signature`,type:`object`,raw:`{
	src: string;
	alt?: string;
	intrinsicWidth?: number;
	intrinsicHeight?: number;
	candidates?: readonly ImageCandidate[];
	sources?: readonly ResponsiveImageSource[];
}`,signature:{properties:[{key:`src`,value:{name:`string`,required:!0}},{key:`alt`,value:{name:`string`,required:!1}},{key:`intrinsicWidth`,value:{name:`number`,required:!1}},{key:`intrinsicHeight`,value:{name:`number`,required:!1}},{key:`candidates`,value:{name:`unknown`,required:!1}},{key:`sources`,value:{name:`unknown`,required:!1}}]}},description:``},alt:{required:!1,tsType:{name:`string`},description:``}},composes:[`Omit`,`Pick`]}})),d,f,p,m,h;e((()=>{u(),d=`photo-1500530855697-b586d89ba3ee`,f=(e,t)=>`https://images.unsplash.com/${d}?auto=format&fit=crop&w=${e}&fm=${t}&q=80`,p={title:`Shared/UI/Image/ImageView`,component:c,args:{layout:`intrinsic`,sizes:`(min-width: 64rem) 64rem, 100vw`,image:{src:f(1600,`jpg`),alt:`Responsive-пейзаж`,intrinsicWidth:1600,intrinsicHeight:1067,candidates:[{src:f(640,`jpg`),width:640},{src:f(1280,`jpg`),width:1280},{src:f(1600,`jpg`),width:1600}],sources:[{type:`image/avif`,candidates:[{src:f(640,`avif`),width:640},{src:f(1280,`avif`),width:1280},{src:f(1600,`avif`),width:1600}]},{type:`image/webp`,candidates:[{src:f(640,`webp`),width:640},{src:f(1280,`webp`),width:1280},{src:f(1600,`webp`),width:1600}]}]}},parameters:{layout:`padded`}},m={},m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{}`,...m.parameters?.docs?.source}}},h=[`ResponsiveCandidates`]}))();export{m as ResponsiveCandidates,h as __namedExportsOrder,p as default};