{"version":3,"file":"webpack-chunks/chunk.621.d9ee8c5750834adaf9e7.js","mappings":"qJAEO,MAAMA,EAAW,CAACC,EAAW,GAAIC,EAAO,OACvCC,EAAAA,SAAAA,QAAiBF,GAAUG,MAAMC,GAAUA,EAAMH,OAASA,K,yFCDlE,MAAMI,EAAQ,EAAGL,SAAAA,KAAe,+BAAMA,GAChCM,EAAU,EAAGN,SAAAA,KAAe,+BAAMA,GAExC,SAASO,GAAQ,SAAEP,KAAaQ,IAC/B,MAAMC,GAAQV,EAAAA,EAAAA,GAASC,EAAUK,GAC3BK,GAAUX,EAAAA,EAAAA,GAASC,EAAUM,GACnC,OACC,2BAAKK,MAAM,8CACTF,EACAC,GAKJH,EAAQF,MAAQA,EAChBE,EAAQD,QAAUA,ECdH,SAASM,GAAgB,SAAEZ,KAAaQ,IACtD,MAAM,KAAEK,GAASL,EACjB,OAAO,oBAAC,IAAD,CAAiBM,YAAaD,GAAOb,K,0FCH7C,MAAMe,GAAiBC,EAAAA,EAAAA,eAAc,MAE9B,SAASC,IACf,MAAMC,GAAUC,EAAAA,EAAAA,YAAWJ,GAC3B,QAAgBK,IAAZF,EACH,MAAM,IAAIG,MAAM,6BAKjB,OAAOH,EAGD,SAASI,GAAgB,SAAEtB,EAAF,YAAYc,EAAc,YACzD,MAAOS,EAAeC,IAAoBC,EAAAA,EAAAA,UAAS,OAC5CZ,EAAMa,IAAWD,EAAAA,EAAAA,UAASX,GAE3Ba,EAAQ,CACbJ,cAAAA,EACAC,iBAAmBG,IAElBH,EAAiBG,IAElBd,KAAAA,EACAa,QAAAA,GAED,OACC,oBAACX,EAAea,SAAhB,CAAyBD,MAAOA,GAAQ3B","sources":["webpack://wfp-usa/./wp-content/themes/tombras/blocks/utils/components/findSlot.js","webpack://wfp-usa/./wp-content/themes/tombras/blocks/components/hotspot/components/BaseHotspot.jsx","webpack://wfp-usa/./wp-content/themes/tombras/blocks/components/hotspot/components/Frontend/Hotspot.jsx","webpack://wfp-usa/./wp-content/themes/tombras/blocks/components/hotspot/context/index.jsx"],"sourcesContent":["import { Children, cloneElement } from \"react\";\n\nexport const findSlot = (children = [], type = null) => {\n\treturn Children.toArray(children).find((child) => child.type === type);\n};\n","import { findSlot } from \"../../../utils/components/findSlot\";\n\nconst Image = ({ children }) => <div>{children}</div>;\nconst Content = ({ children }) => <div>{children}</div>;\n\nfunction Hotspot({ children, ...props }) {\n\tconst image = findSlot(children, Image);\n\tconst content = findSlot(children, Content);\n\treturn (\n\t\t<div class=\"hotspot grid gap-4 lg:grid-cols-2 lg:gap-8\">\n\t\t\t{image}\n\t\t\t{content}\n\t\t</div>\n\t);\n}\n\nHotspot.Image = Image;\nHotspot.Content = Content;\nexport default Hotspot;\n","import { HotspotProvider } from \"../../context/index.jsx\";\nimport Hotspot from \"../BaseHotspot.jsx\";\n\nexport default function FrontendHotspot({ children, ...props }) {\n\tconst { size } = props;\n\treturn <HotspotProvider defaultSize={size}>{children}</HotspotProvider>;\n}\n","import { createContext, useContext, useState } from \"react\";\n\nconst HotspotContext = createContext(null);\n\nexport function useHotspot() {\n\tconst context = useContext(HotspotContext);\n\tif (context === undefined) {\n\t\tthrow new Error(\"Hotspot context not found\");\n\t}\n\n\tconsole.log(\"context\", context);\n\n\treturn context;\n}\n\nexport function HotspotProvider({ children, defaultSize = \"h-8 w-8\" }) {\n\tconst [activeHotspot, setActiveHotspot] = useState(null);\n\tconst [size, setSize] = useState(defaultSize);\n\n\tconst value = {\n\t\tactiveHotspot,\n\t\tsetActiveHotspot: (value) => {\n\t\t\tconsole.log(\"what is the value\", value);\n\t\t\tsetActiveHotspot(value);\n\t\t},\n\t\tsize,\n\t\tsetSize,\n\t};\n\treturn (\n\t\t<HotspotContext.Provider value={value}>{children}</HotspotContext.Provider>\n\t);\n}\n"],"names":["findSlot","children","type","Children","find","child","Image","Content","Hotspot","props","image","content","class","FrontendHotspot","size","defaultSize","HotspotContext","createContext","useHotspot","context","useContext","undefined","Error","HotspotProvider","activeHotspot","setActiveHotspot","useState","setSize","value","Provider"],"sourceRoot":""}