const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ImageViewerRuntime-C-Vsq4pT.js","./preload-helper-B45gAKPr.js","./iframe-CMLjY6eW.js","./react-dom-CVpgvhSC.js","./utils-PcgESe3m.js","./ImageViewerRuntime-CRmlrtpL.css"])))=>i.map(i=>d[i]);
import{c as e,i as t,n,t as r}from"./preload-helper-B45gAKPr.js";import{pn as i,t as a}from"./iframe-CMLjY6eW.js";import{t as o}from"./Button-zPlrr4BS.js";import{t as s}from"./button-ByG7LVhg.js";var c=t((()=>{})),l=t((()=>{})),u=t((()=>{})),d=t((()=>{}));function f(e){let[t,n]=(0,p.useState)(!1),r=(0,p.useCallback)(()=>n(!0),[]);return typeof document<`u`&&(e.open||t)?(0,m.jsx)(p.Suspense,{fallback:null,children:(0,m.jsx)(h,{...e,onRuntimeMounted:r})}):null}var p,m,h,g=t((()=>{p=e(i(),1),c(),l(),u(),d(),m=a(),n(),h=(0,p.lazy)(()=>r(()=>import(`./ImageViewerRuntime-C-Vsq4pT.js`),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),f.__docgenInfo={description:`Управляемый полноэкранный viewer с ленивой границей vendor runtime.
YARL и его плагины загружаются только при первом открытии, а после mount runtime остаётся в React-дереве,
чтобы закрытие успело завершить анимацию, снять inert и вернуть focus исходному trigger.`,methods:[],displayName:`ImageViewer`,props:{open:{required:!0,tsType:{name:`boolean`},description:``},images:{required:!0,tsType:{name:`unknown`},description:``},index:{required:!1,tsType:{name:`number`},description:``},onClose:{required:!0,tsType:{name:`signature`,type:`function`,raw:`() => void`,signature:{arguments:[],return:{name:`void`}}},description:``},onIndexChange:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(index: number) => void`,signature:{arguments:[{type:{name:`number`},name:`index`}],return:{name:`void`}}},description:``},features:{required:!1,tsType:{name:`signature`,type:`object`,raw:`{
	readonly captions?: boolean;
	readonly counter?: boolean;
	readonly download?: boolean;
	readonly fullscreen?: boolean;
	readonly thumbnails?: boolean;
	readonly zoom?: boolean;
}`,signature:{properties:[{key:`captions`,value:{name:`boolean`,required:!1}},{key:`counter`,value:{name:`boolean`,required:!1}},{key:`download`,value:{name:`boolean`,required:!1}},{key:`fullscreen`,value:{name:`boolean`,required:!1}},{key:`thumbnails`,value:{name:`boolean`,required:!1}},{key:`zoom`,value:{name:`boolean`,required:!1}}]}},description:``},loop:{required:!1,tsType:{name:`boolean`},description:``},closeOnBackdropClick:{required:!1,tsType:{name:`boolean`},description:``},closeOnPullDown:{required:!1,tsType:{name:`boolean`},description:``},labels:{required:!1,tsType:{name:`Partial`,elements:[{name:`signature`,type:`object`,raw:`{
	readonly previous: string;
	readonly next: string;
	readonly close: string;
	readonly slide: string;
	readonly carousel: string;
	readonly lightbox: string;
	readonly photoGallery: string;
	readonly slideCounter: string;
	readonly zoomIn: string;
	readonly zoomOut: string;
	readonly enterFullscreen: string;
	readonly exitFullscreen: string;
	readonly thumbnails: string;
	readonly showThumbnails: string;
	readonly hideThumbnails: string;
	readonly caption: string;
	readonly showCaptions: string;
	readonly hideCaptions: string;
	readonly download: string;
}`,signature:{properties:[{key:`previous`,value:{name:`string`,required:!0}},{key:`next`,value:{name:`string`,required:!0}},{key:`close`,value:{name:`string`,required:!0}},{key:`slide`,value:{name:`string`,required:!0}},{key:`carousel`,value:{name:`string`,required:!0}},{key:`lightbox`,value:{name:`string`,required:!0}},{key:`photoGallery`,value:{name:`string`,required:!0}},{key:`slideCounter`,value:{name:`string`,required:!0}},{key:`zoomIn`,value:{name:`string`,required:!0}},{key:`zoomOut`,value:{name:`string`,required:!0}},{key:`enterFullscreen`,value:{name:`string`,required:!0}},{key:`exitFullscreen`,value:{name:`string`,required:!0}},{key:`thumbnails`,value:{name:`string`,required:!0}},{key:`showThumbnails`,value:{name:`string`,required:!0}},{key:`hideThumbnails`,value:{name:`string`,required:!0}},{key:`caption`,value:{name:`string`,required:!0}},{key:`showCaptions`,value:{name:`string`,required:!0}},{key:`hideCaptions`,value:{name:`string`,required:!0}},{key:`download`,value:{name:`string`,required:!0}}]}}],raw:`Partial<ImageViewerLabels>`},description:``},className:{required:!1,tsType:{name:`string`},description:``},style:{required:!1,tsType:{name:`intersection`,raw:`CSSProperties & Partial<Record<ImageViewerCssVariable, string | number>>`,elements:[{name:`CSSProperties`},{name:`Partial`,elements:[{name:`Record`,elements:[{name:`union`,raw:`| "--image-viewer-z-index"
| "--image-viewer-backdrop"
| "--image-viewer-control-color"
| "--image-viewer-control-active-color"
| "--image-viewer-control-disabled-color"
| "--image-viewer-control-background"
| "--image-viewer-control-border"
| "--image-viewer-control-radius"
| "--image-viewer-control-filter"
| "--image-viewer-icon-size"
| "--image-viewer-icon-stroke-width"
| "--image-viewer-toolbar-padding"
| "--image-viewer-focus"
| "--image-viewer-focus-offset"
| "--image-viewer-image-radius"
| "--image-viewer-caption-background"
| "--image-viewer-caption-color"
| "--image-viewer-counter-color"
| "--image-viewer-thumbnail-background"
| "--image-viewer-thumbnail-border-color"
| "--image-viewer-thumbnail-active-border-color"
| "--image-viewer-loading-color"
| "--image-viewer-error-color"`,elements:[{name:`literal`,value:`"--image-viewer-z-index"`},{name:`literal`,value:`"--image-viewer-backdrop"`},{name:`literal`,value:`"--image-viewer-control-color"`},{name:`literal`,value:`"--image-viewer-control-active-color"`},{name:`literal`,value:`"--image-viewer-control-disabled-color"`},{name:`literal`,value:`"--image-viewer-control-background"`},{name:`literal`,value:`"--image-viewer-control-border"`},{name:`literal`,value:`"--image-viewer-control-radius"`},{name:`literal`,value:`"--image-viewer-control-filter"`},{name:`literal`,value:`"--image-viewer-icon-size"`},{name:`literal`,value:`"--image-viewer-icon-stroke-width"`},{name:`literal`,value:`"--image-viewer-toolbar-padding"`},{name:`literal`,value:`"--image-viewer-focus"`},{name:`literal`,value:`"--image-viewer-focus-offset"`},{name:`literal`,value:`"--image-viewer-image-radius"`},{name:`literal`,value:`"--image-viewer-caption-background"`},{name:`literal`,value:`"--image-viewer-caption-color"`},{name:`literal`,value:`"--image-viewer-counter-color"`},{name:`literal`,value:`"--image-viewer-thumbnail-background"`},{name:`literal`,value:`"--image-viewer-thumbnail-border-color"`},{name:`literal`,value:`"--image-viewer-thumbnail-active-border-color"`},{name:`literal`,value:`"--image-viewer-loading-color"`},{name:`literal`,value:`"--image-viewer-error-color"`}]},{name:`union`,raw:`string | number`,elements:[{name:`string`},{name:`number`}]}],raw:`Record<ImageViewerCssVariable, string | number>`}],raw:`Partial<Record<ImageViewerCssVariable, string | number>>`}]},description:``}}}}));function _(e,t,n=`webp`){return`https://images.unsplash.com/${e}?auto=format&fit=crop&w=${t}&fm=${n}&q=80`}var v,y,b,x,S,C,w,T,E;t((()=>{v=e(i(),1),s(),g(),y=a(),b=[`photo-1500530855697-b586d89ba3ee`,`photo-1441974231531-c6227db76b6e`,`photo-1470252649378-9c29740c9fa8`],x=b.map((e,t)=>({src:_(e,1600),alt:`Природный пейзаж ${t+1}`,title:`Изображение ${t+1}`,description:`Responsive slide с миниатюрой, zoom, fullscreen и доступной русской навигацией.`,thumbnail:_(e,240),intrinsicWidth:1600,intrinsicHeight:900,candidates:[640,1280,1600].map(t=>({src:_(e,t),width:t})),sources:[{type:`image/avif`,candidates:[640,1280,1600].map(t=>({src:_(e,t,`avif`),width:t}))}],download:{url:_(e,2e3,`jpg`),filename:`landscape-${t+1}.jpg`}})),S={"--image-viewer-backdrop":`rgb(8 14 28 / 96%)`,"--image-viewer-control-active-color":`#7dd3fc`,"--image-viewer-thumbnail-active-border-color":`#7dd3fc`,"--image-viewer-caption-background":`rgb(8 14 28 / 72%)`},C={title:`Shared/UI/Image/ImageViewer`,component:f,args:{open:!1,images:x,onClose:()=>void 0},parameters:{layout:`centered`}},w={render:e=>{let[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)(0);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(o,{onClick:()=>n(!0),children:`Открыть галерею`}),(0,y.jsx)(f,{...e,open:t,index:r,onClose:()=>n(!1),onIndexChange:i,features:{download:!0},style:S})]})}},T={render:e=>{let[t,n]=(0,v.useState)(!1);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(o,{onClick:()=>n(!0),children:`Открыть одно изображение`}),(0,y.jsx)(f,{...e,open:t,images:x.slice(0,1),onClose:()=>n(!1)})]})}},w.parameters={...w.parameters,docs:{...w.parameters?.docs,source:{originalSource:`{
  render: args => {
    const [open, setOpen] = useState(false);
    const [index, setIndex] = useState(0);
    return <>
                <Button onClick={() => setOpen(true)}>Открыть галерею</Button>
                <ImageViewer {...args} open={open} index={index} onClose={() => setOpen(false)} onIndexChange={setIndex} features={{
        download: true
      }} style={CUSTOM_STYLE} />
            </>;
  }
}`,...w.parameters?.docs?.source}}},T.parameters={...T.parameters,docs:{...T.parameters?.docs,source:{originalSource:`{
  render: args => {
    const [open, setOpen] = useState(false);
    return <>
                <Button onClick={() => setOpen(true)}>Открыть одно изображение</Button>
                <ImageViewer {...args} open={open} images={IMAGES.slice(0, 1)} onClose={() => setOpen(false)} />
            </>;
  }
}`,...T.parameters?.docs?.source}}},E=[`ResponsiveGallery`,`SingleImage`]}))();export{w as ResponsiveGallery,T as SingleImage,E as __namedExportsOrder,C as default};