"use strict";(self.webpackChunkAutoGen_Assistant=self.webpackChunkAutoGen_Assistant||[]).push([[764],{21929:function(e,t,a){a.r(t),a.d(t,{default:function(){return d}});var l=a(67294),s=a(30372),n=a(91160),r=a(15596),c=(a(1642),a(71968)),m=a(82313),i=a(6244),o=a(71082);var u=e=>{let{location:t}=e;const a=(0,r.RU)(),{user:s}=l.useContext(n.T),[u,d]=l.useState(!1),[E,g]=l.useState(null),[h,v]=(null==s||s.email,l.useState({status:!0,message:"All good"}));l.useEffect((()=>{new URLSearchParams(t.search).get("id")||v({status:!1,message:"A Gallery ID is required to view the gallery. "})}),[]);return l.createElement("div",{className:" "},l.createElement("div",{className:"mb-4 text-2xl"},"Item Details"),l.createElement("div",null,"V "),E&&0===E.length&&l.createElement("div",{className:"text-sm border rounded text-secondary p-2"},l.createElement(m.Z,{className:"h-4 w-4 inline mr-1"}),"No gallery items found. Please create a chat session and publish to gallery."),u&&l.createElement("div",{className:"w-full text-center boder mt-4"},l.createElement("div",null," ",l.createElement(c.F8,null)),"loading gallery"),h&&!h.status&&l.createElement("div",{className:"p-2 border rounded mt-4 text-sm"}," ",l.createElement(i.Z,{className:"h-5  inline-block mr-2"})," ",l.createElement("span",{className:" text-orange-500 inline-block "}," ",h.message)," ","Go back to"," ",l.createElement("span",{className:"underline"},l.createElement(o.Link,{to:"/gallery"},"Gallery"))))};var d=e=>{let{location:t,data:a}=e;return console.log("location",t),l.createElement(s.Z,{meta:a.site.siteMetadata,title:"Gallery",link:"/gallery"},l.createElement("main",{style:{height:"100%"},className:" h-full "},l.createElement(u,{location:t})))}}}]);
//# sourceMappingURL=component---src-pages-gallery-viewer-tsx-3de4b2cc15ef6fdfd048.js.map