'use client';
import{jsxs as e,Fragment as r,jsx as a}from"react/jsx-runtime";import t from"next/head";import i from"./Img.js";let m=({srcSet:m,priority:s=!1,pictureClass:c,...l})=>m?.desktop?.src?e(r,{children:[a(t,{children:Object.entries(m).map(([e,r])=>r?.src&&a("link",{rel:"preload",href:r.src,as:"image"},`preload-${e}`))}),e("picture",{className:c,children:[(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&&a("source",{media:e,srcSet:r},e))})(m),a(i,{...l,loading:s?"eager":"lazy",image:{src:m.desktop.src}})]})]}):null;export{m as default};
