1import{X as te,o as pe,p as je,k as w,V as E,r as v,j as e,w as z,a0 as fe,B as b,x as Q,y as G,z as K,Y as L,L as C,I as M,a8 as ae,b1 as ie,C as S,f as D,m as B,d as I,e as F,S as O,A as ve}from"./index-IxvR3ybE.js";import{E as ee}from"./EventSelector-Bpv922Gw.js";import{S as W,a as R,b as J,c as Y,d as q}from"./select-C66k4zpo.js";import{J as d}from"./index-Cm6HJhbV.js";import{P as X}from"./plus-ByP2IBiw.js";import{U as re}from"./upload-BHMwgFmi.js";import{S as ye}from"./switch-CVhsjzBh.js";import{D as Ne,a as we,b as be,e as V}from"./dropdown-menu-M0zank7A.js";import{A as le,b as ne,c as oe,d as de,e as ce,f as me,g as he,h as ge}from"./alert-dialog-LkDSbIL4.js";import{I as $}from"./image-DrpSER0q.js";import{V as Z}from"./video-xqbAqm0Z.js";import{T as ue}from"./trash-2-DklbPQfi.js";import{E as Ce}from"./ellipsis-Ce02OX0I.js";import{S as _e}from"./square-pen-DP9ydQSt.js";import{P as Se}from"./PaymentGuard-CsV7Fhnv.js";import{L as De}from"./loader-IuTMkbZP.js";import{E as Me}from"./eye-BCxLm4fq.js";import"./index-BdQq_4o_.js";import"./index-PCA-xeVB.js";import"./chevron-up-Kie37_ZB.js";import"./chevron-right-f_PxsSL8.js";import"./usePaystackConfig-BiPyfAu1.js";import"./usePayment-DbOsPFvK.js";import"./credit-card-CqkMcI0L.js";import"./circle-check-big-DrZso9hg.js";import"./useReferralCode-DoUD49Ha.js";import"./AccessCodeInput-MBolaJC1.js";import"./lock-open-BznoiT3l.js";import"./key-p_SgkhAy.js";const T=()=>{const{selectedEventId:s}=te(),h=pe(),{data:i=[],isLoading:o,error:j}=je({queryKey:["admin-highlights",s],queryFn:async()=>{if(!s)return[];const{data:t,error:l}=await w.from("highlights").select("*").eq("event_id",s).order("display_order",{ascending:!0});if(l)throw l;return await Promise.all((t||[]).map(async a=>{const{data:c}=await w.from("highlight_media").select("*").eq("highlight_id",a.id).order("media_order");return{...a,highlight_media:c||[]}}))},enabled:!!s}),g=E({mutationFn:async t=>{if(!s)throw new Error("No event selected");const{data:l,error:N}=await w.from("highlights").insert({...t,event_id:s}).select().single();if(N)throw N;return l},onSuccess:()=>{h.invalidateQueries({queryKey:["admin-highlights",s]}),d.success("Highlight created successfully")},onError:t=>{console.error("Error creating highlight:",t),d.error("Failed to create highlight")}}),u=E({mutationFn:async({id:t,updates:l})=>{const{data:N,error:a}=await w.from("highlights").update(l).eq("id",t).select().single();if(a)throw a;return N},onSuccess:()=>{h.invalidateQueries({queryKey:["admin-highlights",s]}),d.success("Highlight updated successfully")},onError:t=>{console.error("Error updating highlight:",t),d.error("Failed to update highlight")}}),y=E({mutationFn:async t=>{await w.from("highlight_media").delete().eq("highlight_id",t);const{error:l}=await w.from("highlights").delete().eq("id",t);if(l)throw l},onSuccess:()=>{h.invalidateQueries({queryKey:["admin-highlights",s]}),d.success("Highlight deleted successfully")},onError:t=>{console.error("Error deleting highlight:",t),d.error("Failed to delete highlight")}}),x=E({mutationFn:async t=>{const{data:l,error:N}=await w.from("highlight_media").insert(t).select().single();if(N)throw N;return l},onSuccess:()=>{h.invalidateQueries({queryKey:["admin-highlights",s]}),d.success("Media added to highlight")},onError:t=>{console.error("Error adding media:",t),d.error("Failed to add media")}}),r=E({mutationFn:async t=>{const{error:l}=await w.from("highlight_media").delete().eq("id",t);if(l)throw l},onSuccess:()=>{h.invalidateQueries({queryKey:["admin-highlights",s]}),d.success("Media removed from highlight")},onError:t=>{console.error("Error removing media:",t),d.error("Failed to remove media")}}),f=E({mutationFn:async t=>{const l=t.map(({id:N,display_order:a})=>w.from("highlights").update({display_order:a}).eq("id",N));await Promise.all(l)},onSuccess:()=>{h.invalidateQueries({queryKey:["admin-highlights",s]}),d.success("Highlight order updated")},onError:t=>{console.error("Error updating order:",t),d.error("Failed to update order")}});return{highlights:i,isLoading:o,error:j,createHighlight:g,updateHighlight:u,deleteHighlight:y,addHighlightMedia:x,removeHighlightMedia:r,updateHighlightOrder:f}},Ee=["Behind the Scenes","Speaker Moments","Announcements","Networking","Workshops","Entertainment","Other"],se=()=>{const[s,h]=v.useState(!1),[i,o]=v.useState(""),[j,g]=v.useState(""),[u,y]=v.useState(null),[x,r]=v.useState(!1),{createHighlight:f}
1=T(),t=a=>{var p;const c=(p=a.target.files)==null?void 0:p[0];if(c){if(c.size>5*1024*1024){d.error("Image must be less than 5MB"),a.target.value="";return}if(!["image/jpeg","image/jpg","image/png","image/gif","image/webp"].includes(c.type)){d.error("Please select a valid image file (JPEG, PNG, GIF, or WebP)"),a.target.value="";return}y(c)}},l=async a=>{try{const c=a.name.split(".").pop(),_=`highlights/${`${Date.now()}-${Math.random().toString(36).substring(2)}.${c}`}`,{error:H}=await w.storage.from("media").upload(_,a,{cacheControl:"3600",upsert:!1});if(H)throw console.error("Upload error:",H),new Error(`Upload failed: ${H.message}`);const{data:k}=w.storage.from("media").getPublicUrl(_);return k.publicUrl}catch(c){throw console.error("File upload error:",c),c}},N=async a=>{if(a.preventDefault(),!i.trim()){d.error("Please enter a title for the highlight");return}r(!0);try{let c=null;if(u)try{c=await l(u)}catch(_){console.error("Image upload failed:",_),d.error("Failed to upload image. Please try again."),r(!1);return}await f.mutateAsync({title:i.trim(),category:j||null,cover_image_url:c,is_published:!1,display_order:0}),o(""),g(""),y(null);const p=document.getElementById("cover");p&&(p.value=""),h(!1),d.success("Highlight created successfully!")}catch(c){console.error("Error creating highlight:",c),d.error("Failed to create highlight. Please try again.")}finally{r(!1)}};return e.jsxs(z,{open:s,onOpenChange:h,children:[e.jsx(fe,{asChild:!0,children:e.jsxs(b,{className:"w-full sm:w-auto",children:[e.jsx(X,{className:"h-4 w-4 mr-2"}),"Create Highlight"]})}),e.jsxs(Q,{className:"sm:max-w-md",children:[e.jsxs(G,{children:[e.jsx(K,{children:"Create New Highlight"}),e.jsx(L,{children:"Create a new highlight to showcase special moments from your event."})]}),e.jsxs("form",{onSubmit:N,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{htmlFor:"title",children:"Title"}),e.jsx(M,{id:"title",value:i,onChange:a=>o(a.target.value),placeholder:"Enter highlight title",required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{htmlFor:"category",children:"Category (Optional)"}),e.jsxs(W,{value:j,onValueChange:g,children:[e.jsx(R,{children:e.jsx(J,{placeholder:"Select a category"})}),e.jsx(Y,{children:Ee.map(a=>e.jsx(q,{value:a,children:a},a))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{htmlFor:"cover",children:"Cover Image (Optional)"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(M,{id:"cover",type:"file",accept:"image/jpeg,image/jpg,image/png,image/gif,image/webp",onChange:t,className:"hidden"}),e.jsxs(b,{type:"button",variant:"outline",onClick:()=>{var a;return(a=document.getElementById("cover"))==null?void 0:a.click()},className:"w-full",disabled:x,children:[e.jsx(re,{className:"h-4 w-4 mr-2"}),u?u.name:"Choose Image"]}),u&&e.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>{y(null);const a=document.getElementById("cover");a&&(a.value="")},disabled:x,children:e.jsx(ae,{className:"h-4 w-4"})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Maximum 5MB. Supported formats: JPEG, PNG, GIF, WebP. If not provided, the first media item will be used as cover."})]}),e.jsxs(ie,{children:[e.jsx(b,{type:"button",variant:"outline",onClick:()=>h(!1),children:"Cancel"}),e.jsx(b,{type:"submit",disabled:x||!i.trim(),children:x?"Creating...":"Create Highlight"})]})]})]})]})},Ie=["Behind the Scenes","Speaker Moments","Announcements","Networking","Workshops","Entertainment","Other"],Fe=({highlight:s,open:h,onOpenChange:i})=>{const[o,j]=v.useState(""),[g,u]=v.useState(""),[y,x]=v.useState(""),{updateHighlight:r}=T();v.useEffect(()=>{h&&(j(s.title),u(s.category||""),x(s.cover_image_url||""))},[h,s]);const f=t=>{t.preventDefault(),o.trim()&&(r.mutate({id:s.id,updates:{title:o.trim(),category:g||null,cover_image_url:y||null}}),i(!1))};return e.jsx(z,{open:h,onOpenChange:i,children:e.jsxs(Q,{className:"sm:max-w-md",children:[e.jsxs(G,{children:[e.jsx(K,{children:"Edit Highlight"}),e.jsx(L,{children:"Update the highlight details below."})]}),e.jsxs("form",{onSubmit:f,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{htmlFor:"edit-title",children:"Title"}),e.jsx(M,{id:"edit-title",value:o,onChange:t=>j(t.target.value),placeholder:"Enter highlight title",required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{htmlFor:"edit-category",children:"Category (Optional)"}),e.jsxs(W,{value:g,onValueChange:u,children:[e.jsx(R,{children:e.jsx(J,{placeholder:"Select a category"})}),e.jsx(Y,{children:Ie.map(t=>e.jsx(q,{value:t,children:t},t))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{htmlFor:"edit-cover",children:"Cover Image URL (Optional)"}),e.jsx(M,{id:"edit-cover",value:y,onChange:t=>x(t.target.value),placeholder:"https://example.com/image.jpg",type:"url"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"If not provided, the first media item will be used as cover"})]}),e.jsxs(ie,{children:[e.jsx(b,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),e.jsx(b,{type:"submit",disabled:r.isPending||!o.trim(),children:"Update Highlight"})]})]})]})})},He=({highlight:s,open:h,onOpenChange:i})=>
1{const[o,j]=v.useState(null),[g,u]=v.useState("image"),[y,x]=v.useState(5),[r,f]=v.useState(null),[t,l]=v.useState(!1),{addHighlightMedia:N,removeHighlightMedia:a}=T(),c=n=>{var P;const m=(P=n.target.files)==null?void 0:P[0];if(m){if(m.size>5242880){d.error(`${g==="image"?"Image":"Video"} must be less than 5MB`);return}const U=g==="image"?"image/":"video/";if(!m.type.startsWith(U)){d.error(`Please select a ${g} file`);return}j(m)}},p=async n=>{const m=n.name.split(".").pop(),A=`highlights/${`${Math.random()}.${m}`}`,{error:U}=await w.storage.from("media").upload(A,n);if(U)throw U;const{data:xe}=w.storage.from("media").getPublicUrl(A);return xe.publicUrl},_=async n=>{if(n.preventDefault(),!o){d.error("Please select a file");return}l(!0);try{const m=await p(o),P=Math.max(...s.highlight_media.map(A=>A.media_order),-1)+1;await N.mutateAsync({highlight_id:s.id,media_url:m,media_type:g,media_order:P,duration_seconds:y}),j(null),u("image"),x(5)}catch(m){console.error("Error adding media:",m),d.error("Failed to add media")}finally{l(!1)}},H=()=>{r&&(a.mutate(r),f(null))},k=[...s.highlight_media].sort((n,m)=>n.media_order-m.media_order);return e.jsxs(e.Fragment,{children:[e.jsx(z,{open:h,onOpenChange:i,children:e.jsxs(Q,{className:"sm:max-w-2xl max-h-[80vh] overflow-auto",children:[e.jsxs(G,{children:[e.jsxs(K,{children:["Manage Media - ",s.title]}),e.jsx(L,{children:"Add, remove, and organize media for this highlight."})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(S,{children:e.jsx(D,{className:"pt-6",children:e.jsxs("form",{onSubmit:_,className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{htmlFor:"media-type",children:"Media Type"}),e.jsxs(W,{value:g,onValueChange:n=>{u(n),j(null)},children:[e.jsx(R,{children:e.jsx(J,{})}),e.jsxs(Y,{children:[e.jsx(q,{value:"image",children:"Image"}),e.jsx(q,{value:"video",children:"Video"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{htmlFor:"duration",children:"Duration (seconds)"}),e.jsx(M,{id:"duration",type:"number",min:5,max:30,value:y,onChange:n=>{const m=parseInt(n.target.value);m>=5&&m<=30?x(m):m<5?x(5):m>30&&x(30)}})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(C,{htmlFor:"media-file",children:[g==="image"?"Image":"Video"," File"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(M,{id:"media-file",type:"file",accept:g==="image"?"image/*":"video/*",onChange:c,className:"hidden"}),e.jsxs(b,{type:"button",variant:"outline",onClick:()=>{var n;return(n=document.getElementById("media-file"))==null?void 0:n.click()},className:"w-full",children:[e.jsx(re,{className:"h-4 w-4 mr-2"}),o?o.name:`Choose ${g==="image"?"Image":"Video"}`]}),o&&e.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>j(null),children:e.jsx(ae,{className:"h-4 w-4"})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Maximum 5MB for all media files. Duration: 5-30 seconds."})]}),e.jsxs(b,{type:"submit",disabled:t||!o,className:"w-full",children:[e.jsx(X,{className:"h-4 w-4 mr-2"}),t?"Uploading...":"Add Media"]})]})})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("h3",{className:"text-sm font-medium",children:["Current Media (",k.length,")"]})}),k.length===0?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx("div",{className:"mx-auto w-12 h-12 rounded-full bg-muted flex items-center justify-center mb-3",children:e.jsx($,{className:"h-6 w-6"})}),e.jsx("p",{children:"No media added yet"}),e.jsx("p",{className:"text-sm",children:"Add images or videos to create your highlight"})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:k.map((n,m)=>e.jsx(S,{className:"relative group",children:e.jsxs(D,{className:"p-3",children:[e.jsxs("div",{className:"aspect-video relative rounded-lg overflow-hidden bg-muted mb-3",children:[n.media_type==="image"?e.jsx("img",{src:n.media_url,alt:`Media ${m+1}`,className:"object-cover w-full h-full"}):e.jsx("video",{src:n.media_url,className:"object-cover w-full h-full",controls:!0}),e.jsx("div",{className:"absolute top-2 left-2",children:e.jsxs(B,{variant:"secondary",className:"text-xs",children:["#",m+1]})}),e.jsx("div",{className:"absolute top-2 right-2",children:e.jsxs(B,{variant:n.media_type==="image"?"default":"secondary",className:"text-xs",children:[n.media_type==="image"?e.jsx($,{className:"h-3 w-3 mr-1"}):e.jsx(Z,{className:"h-3 w-3 mr-1"}),n.duration_seconds,"s"]})})]}),e.jsxs(b,{variant:"destructive",size:"sm",className:"w-full",onClick:()=>f(n.id),children:[e.jsx(ue,{className:"h-4 w-4 mr-2"}),"Remove"]})]})},n.id))})]})]})]})}),e.jsx(le,{open:!!r,onOpenChange:()=>f(null),children:e.jsxs(ne,{children:[e.jsxs(oe,{children:[e.jsx(de,{children:"Remove Media"}),e.jsx(ce,{children:"Are you sure you want to remove this media from the highlight? This action cannot be undone."})]}),e.jsxs(me,{children:[e.jsx(he,{children:"Cancel"}),e.jsx(ge,{onClick:H,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]})})]})},ke=({highlight:s})=>{var c;const[h,i]=v.useState(!1),[o,j]=v.useState(!1),[g,u]=v.useState(!1),{updateHighlight:y,deleteHighlight:x}=T(),r=p=>{y.mutate({id:s.id,updates:{is_published:p}})},f=()=>{x.mutate(s.id),i(!1)},t=s.cover_image_url||((c=s.highlight_media.find(p=>p.media_type==="image"))==null?void 0:c.media_url)||null,l=s.highlight_media.length,N=s.highlight_media.filter(p=>p.media_type==="image").length,a=s.highlight_media.filter(p=>p.media_type==="video").length;return e.jsxs(e.Fragment,{children:[e.jsxs(S,{className:"group hover:shadow-md transition-shadow",children:[e.jsx(I,{className:"pb-3",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(F,{className:"text-lg",children:s.title}),s.category&&e.jsx(B,{variant:"secondary",className:"text-xs",children:s.category})]}),e.jsxs(Ne,{children:[e.jsx(we,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Ce,{className:"h-4 w-4"})})}),e.jsxs(be,{align:"end",children:[e.jsxs(V,{onClick:()=>j(!0),children:[e.jsx(_e,{className:"mr-2 h-4 w-4"}),"Edit"]}),e.jsxs(V,{onClick:()=>u(!0),children:[e.jsx(X,{className:"mr-2 h-4 w-4"}),"Manage Media"]}),e.jsxs(V,{onClick:()=>i(!0),className:"text-destructive",children:[e.jsx(ue,{className:"mr-2 h-4 w-4"}),"Delete"]})]})]})]})}),e.jsxs(D,{className:"space-y-4",children:[e.jsxs("div",{className:"aspect-video relative rounded-lg overflow-hidden bg-muted",children:[e.jsx("img",{src:t,alt:s.title,className:"object-cover w-full h-full"}),l>0&&e.jsx("div",{className:"absolute top-2 right-2 bg-background/80 backdrop-blur-sm rounded-full px-2 py-1",children:e.jsx("span",{className:"text-xs font-medium",children:l})})]}),e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx($,{className:"h-4 w-4"}),e.jsxs("span",{children:[N," images"]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Z,{className:"h-4 w-4"}),e.jsxs("span",{children:[a," videos"]})]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t",children:[e.jsx(C,{htmlFor:`publish-${s.id}`,className:"text-sm",children:"Published"}),e.jsx(ye,{id:`publish-${s.id}`,checked:s.is_published,onCheckedChange:r})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(C,{htmlFor:`order-${s.id}`,className:"text-sm",children:"Display Order"}),e.jsx(M,{id:`order-${s.id}`,type:"number",min:1,value:s.display_order,onChange:p=>{const _=parseInt(p.target.value)||1;y.mutate({id:s.id,updates:{display_order:_}})},className:"w-20 text-center"})]})]})]}),e.jsx(Fe,{highlight:s,open:o,onOpenChange:j}),e.jsx(He,{highlight:s,open:g,onOpenChange:u}),e.jsx(le,{open:h,onOpenChange:i,children:e.jsxs(ne,{children:[e.jsxs(oe,{children:[e.jsx(de,{children:"Delete Highlight"}),e.jsxs(ce,{children:['Are you sure you want to delete "',s.title,'"? This will also remove all associated media. This action cannot be undone.']})]}),e.jsxs(me,{children:[e.jsx(he,{children:"Cancel"}),e.jsx(ge,{onClick:f,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})})]})},Pe=()=>{const{highlights:s,isLoading:h}=T(),{selectedEvent:i,selectedEventId:o}=te(),j=s.length,g=s.filter(r=>r.is_published).length,u=s.reduce((r,f)=>r+f.highlight_media.length,0),y=s.reduce((r,f)=>r+f.highlight_media.filter(t=>t.media_type==="image").length,0),x=s.reduce((r,f)=>r+f.highlight_media.filter(t=>t.media_type==="video").length,0);return h?e.jsxs("div",{className:"space-y-6 p-4 sm:p-6",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx(ee,{})}),e.jsxs("div",{className:"p-6 sm:p-8 rounded-2xl bg-gradient-to-br from-primary-100 via-purple-100 to-blue-50 text-primary-900 dark:text-white shadow-2xl shadow-primary/10 mb-2 relative overflow-hidden",children:[e.jsx("div",{className:"absolute -top-12 -right-10 w-56 h-56 bg-white/10 rounded-full opacity-40 blur-2xl pointer-events-none"}),e.jsx("div",{className:"absolute -bottom-14 -left-14 w-36 h-36 bg-white/20 rounded-full opacity-30 pointer-events-none"}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("h1",{className:"text-2xl sm:text-3xl lg:text-4xl font-bold tracking-tight",children:"Event Highlights"}),e.jsxs("p",{className:"mt-2 max-w-2xl text-primary-700 dark:text-primary-100 text-sm sm:text-base",children:["Create and manage Instagram-style highlight reels for"," ",e.jsx("span",{className:"font-semibold",children:(i==null?void 0:i.name)??"your event"})]})]})]}),e.jsx("div",{className:"h-24 flex items-center justify-center",children:e.jsx(De,{className:"animate-spin"})})]}):e.jsxs("div",{className:"space-y-6 p-4 sm:p-6",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx(ee,{})}),!o&&e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"p-4 rounded-full bg-primary/10
1inline-block mb-4",children:e.jsx(O,{className:"h-8 w-8 text-primary"})}),e.jsx("p",{className:"text-muted-foreground text-lg mb-2",children:"No event selected"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Please select an event above to manage its highlights"})]}),o&&e.jsxs(Se,{eventId:o,eventName:(i==null?void 0:i.name)||"this event",feature:"Event Highlights",children:[e.jsxs("div",{className:"p-6 sm:p-8 rounded-2xl bg-gradient-to-br from-primary-100 via-purple-100 to-blue-50 text-primary-900 dark:text-white shadow-2xl shadow-primary/10 mb-2 relative overflow-hidden",children:[e.jsx("div",{className:"absolute -top-12 -right-10 w-56 h-56 bg-white/10 rounded-full opacity-40 blur-2xl pointer-events-none"}),e.jsx("div",{className:"absolute -bottom-14 -left-14 w-36 h-36 bg-white/20 rounded-full opacity-30 pointer-events-none"}),e.jsx("div",{className:"relative z-10",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl lg:text-4xl font-bold tracking-tight",children:"Event Highlights"}),e.jsxs("p",{className:"mt-2 max-w-2xl text-primary-700 dark:text-primary-100 text-sm sm:text-base",children:["Create and manage Instagram-style highlight reels for"," ",e.jsx("span",{className:"font-semibold",children:i==null?void 0:i.name})]})]}),e.jsx("div",{className:"flex-shrink-0",children:e.jsx(se,{})})]})})]}),e.jsxs("div",{className:"grid gap-4 grid-cols-2 lg:grid-cols-4",children:[e.jsxs(S,{children:[e.jsxs(I,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(F,{className:"text-sm font-medium",children:"Total Highlights"}),e.jsx(O,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(D,{children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold",children:j}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[g," published"]})]})]}),e.jsxs(S,{children:[e.jsxs(I,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(F,{className:"text-sm font-medium",children:"Total Media"}),e.jsx(Me,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(D,{children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold",children:u}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Images and videos"})]})]}),e.jsxs(S,{children:[e.jsxs(I,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(F,{className:"text-sm font-medium",children:"Images"}),e.jsx($,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(D,{children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold",children:y}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Photo content"})]})]}),e.jsxs(S,{children:[e.jsxs(I,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(F,{className:"text-sm font-medium",children:"Videos"}),e.jsx(Z,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(D,{children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold",children:x}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Video content"})]})]})]}),e.jsxs(S,{children:[e.jsxs(I,{children:[e.jsx(F,{children:"Your Highlights"}),e.jsx(ve,{children:"Manage your event highlights. You can drag and drop to reorder them."})]}),e.jsx(D,{children:s.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"mx-auto w-16 h-16 rounded-full bg-muted flex items-center justify-center mb-4",children:e.jsx(O,{className:"h-8 w-8 text-muted-foreground"})}),e.jsx("h3",{className:"text-lg font-medium mb-2",children:"No highlights yet"}),e.jsx("p",{className:"text-muted-foreground mb-4 max-w-sm mx-auto text-sm sm:text-base",children:"Create your first highlight to showcase special moments from your event."}),e.jsx(se,{})]}):e.jsx("div",{className:"grid gap-4 sm:gap-6 grid-cols-1 md:grid-cols-2 xl:grid-cols-3",children:s.map(r=>e.jsx(ke,{highlight:r},r.id))})})]})]})]})},cs=Pe;export{cs as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.