'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Head=require("next/head"),Img=require("./Img.js");const BREAKPOINTS={},AdaptiveImage=({srcSet:e,priority:r=!1,pictureClass:s,...t})=>{if(!e?.desktop?.src)return null;let i=e=>Object.entries(e).map(([e,r])=>r?.src&&jsxRuntime.jsx("link",{rel:"preload",href:r.src,as:"image"},`preload-${e}`)),a=e=>{let r=[{media:"(max-width: 767px)",srcSet:e.mobile?.src},{media:"(max-width: 1024px)",srcSet:e.tablet?.src}];return r.map(({media:e,srcSet:r})=>r&&jsxRuntime.jsx("source",{media:e,srcSet:r},e))};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Head,{children:i(e)}),jsxRuntime.jsxs("picture",{className:s,children:[a(e),jsxRuntime.jsx(Img.default,{...t,loading:r?"eager":"lazy",image:{src:e.desktop.src}})]})]})};exports.default=AdaptiveImage;
