1import{l as w,b as R,c as $,w as U,o,e as t,d as a,g as m,t as r,f,n as S,F as p,r as v,u as n,i as L,a as O,p as u,G as g,v as lt,I as it,H as nt,j as ut,N}from"./app-CLiv0SF_.js";import{A as mt}from"./AuthenticatedLayout-C5rhqA9B.js";import{f as x,a as gt}from"./formatters-DL2SoqUW.js";import{f as h}from"./productTerms-Dj0d3X4r.js";import{_ as xt}from"./LineChart-DkZ6HhzV.js";import{_ as yt}from"./DoughnutChart-DgQJY45m.js";import{_ as Q}from"./Modal-BbBsTkg0.js";/* empty css */import"./ApplicationLogo-DcBGDrkA.js";/* empty css */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ShieldCheckIcon-DBBc9Wz8.js";import"./SparklesIcon-kYQY9l7f.js";import"./XIcon-1oMX-uYW.js";import"./debounce-CeqZbKiu.js";import"./_baseGetTag-BIcDdAj4.js";import"./CheckCircleIcon-DDNT15IH.js";import"./XCircleIcon-Ja3C1R3H.js";import"./FeedbackWidget-CXt3tLGq.js";/* empty css */import"./auto-DCWVQ5t_.js";import"./chart-BlcCfIke.js";import"./keyboard-3j4TMytL.js";import"./active-element-history-DJuoKIO7.js";const ct={class:"flex justify-between items-center"},bt={class:"flex flex-wrap items-center gap-2"},ft=["href"],pt=["disabled"],vt=["disabled"],wt=["disabled"],ht=["disabled"],kt=["disabled"],jt={class:"py-12"},Ct={class:"max-w-7xl mx-auto sm:px-6 lg:px-8"},St={class:"mb-6 rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-100"},qt={class:"flex flex-wrap items-start justify-between gap-4"},Vt={class:"text-lg font-semibold text-gray-900"},Ut={class:"mt-1 text-sm text-gray-500"},Nt={key:0},At={class:"text-right"},Dt={key:0,class:"mt-4 rounded-lg bg-red-50 p-4"},Pt={class:"mt-1 text-sm text-red-700"},_t={key:1,class:"mt-4 rounded-lg bg-amber-50 p-4"},Tt={class:"mt-1 text-sm text-amber-700"},Rt={key:2,class:"mt-4 flex flex-wrap gap-2"},Mt={key:0,class:"font-normal text-xs"},Ot={class:"mt-5 grid grid-cols-2 gap-4 border-t border-gray-100 pt-4 text-sm sm:grid-cols-4"},Ft={class:"mt-0.5 font-medium text-gray-900"},$t={class:"mt-0.5 font-medium text-gray-900"},It={class:"mt-0.5 font-medium text-gray-900"},Et={class:"mt-0.5 font-medium text-gray-900"},Bt={class:"bg-white overflow-hidden shadow-sm sm:rounded-lg mb-6"},Lt={class:"p-6"},Qt={class:"flex items-start justify-between"},Gt={class:"flex-1"},Ht={class:"grid grid-cols-1 md:grid-cols-3 gap-6"},zt={class:"mt-1"},Jt={key:1,class:"text-sm text-gray-900"},Wt={key:0},Yt={class:"mt-1"},Kt=["href"],Xt={key:1},Zt={class:"mt-1"},te=["href"],ee={key:2},se={class:"mt-1 text-sm text-gray-900"},re={key:3},de={class:"mt-1 text-sm text-gray-900"},oe={key:4},ae={class:"mt-1"},le={key:0},ie={class:"bg-white overflow-hidden shadow-sm sm:rounded-lg"},ne={class:"p-6"},ue={class:"border-b border-gray-200 pb-6"},me={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ge=["value"],xe={class:"col-span-2"},ye={class:"border-b border-gray-200 pb-6"},ce={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},be={class:"col-span-2"},fe={class:"col-span-2"},pe={class:"border-b border-gray-200 pb-6"},ve={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},we={class:"border-b border-gray-200 pb-6"},he={class:"grid grid-cols-1 gap-6"},ke={class:"flex items-center"},je={class:"flex justify-end space-x-3"},Ce={key:1,class:"space-y-8"},Se={class:"border-b border-gray-200 pb-6"},qe={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Ve={class:"col-span-2 mb-6"},Ue={class:"mt-1 flex flex-wrap gap-4"},Ne=["src","alt","onError"],Ae={class:"mt-1 text-sm text-gray-900"},De={class:"mt-1 text-sm text-gray-900"},Pe={class:"col-span-2"},_e=["innerHTML"],Te={class:"mt-1 text-sm text-gray-900"},Re={class:"mt-1 text-sm text-gray-900"},Me={class:"border-b border-gray-200 pb-6"},Oe={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Fe={class:"mt-1 text-sm text-gray-900"},$e={class:"mt-1 text-sm text-gray-900"},Ie={class:"col-span-2"},Ee={class:"mt-1 text-sm text-gray-900"},Be={class:"col-span-2"},Le={class:"mt-1 text-sm text-gray-900"},Qe={class:"border-b border-gray-200 pb-6"},Ge={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},He={class:"mt-1 text-sm text-gray-900"},ze={class:"mt-1 text-sm text-gray-900"},Je={class:"mt-1 text-sm text-gray-900"},We={class:"mt-1 text-sm text-gray-900"},Ye={class:"mt-1 text-sm text-gray-900"},Ke={key:0},Xe={key:1},Ze={class:"mt-1 text-sm text-gray-900"},ts={class:"mt-1 text-sm text-gray-900"},es={class:"mt-1 text-sm text-gray-900"},ss={class:"border-b border-gray-200 pb-6"},rs={class:"grid grid-cols-1 gap-6"},ds={class:"mt-1 text-sm text-gray-900"},os={class:"mt-1 text-sm text-gray-900"},as={class:"mt-1 text-sm text-gray-900"},ls={class:"mt-1 text-sm text-gray-900"},is={class:"mt-1 text-sm text-gray-900"},ns={class:"mt-6 rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-100"},us={class:"grid grid-cols-2 gap-4 lg:grid-cols-4"},ms={class:"rounded-xl bg-gray-50 p-4"},gs={class:"text-2xl font-bold text-[#006838]"},xs={class:"rounded-xl bg-gray-50 p-4"},ys={class:"text-2xl font-bold text-[#006838]"},cs={class:"rounded-xl bg-gray-50 p-4"},bs={class:"text-2xl font-bold text-[#006838]"},fs={class:"rounded-xl bg-gray-50 p-4"},ps={class:"text-2xl font-bold text-[#006838]"},vs={key:0,class:"mt-3 text-sm text-gray-500"},ws={key:1,class:"mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3"},hs={class:"lg:col-span-2"},ks={key:1,class:"py-12 text-center text-sm text-gray-400"},js={key:2,class:"mt-6 overflow-x-auto"},Cs={class:"mb-3 text-sm font-semibold text-gray-700"},Ss={key:0,class:"font-normal text-gray-500"},qs={class:"min-w-full divide-y divide-gray-200"},Vs={class:"divide-y divide-gray-100 bg-white"},Us={class:"px-4 py-2 text-sm"},Ns={class:"font-medium text-gray-900"},As={key:0,class:"ml-1 rounded bg-gray-100 px-1.5 py-0.5 text-[11px] text-gray-600"},Ds={class:"block text-xs text-gray-500"},Ps={class:"whitespace-nowrap px-4 py-2 text-sm text-gray-700"},_s={class:"px-4 py-2 text-sm text-gray-700"},Ts={class:"whitespace-nowrap px-4 py-2 text-sm text-gray-700"},Rs={class:"whitespace-nowrap px-4 py-2 text-sm text-gray-700"},Ms=["title"],Os={key:3,class:"py-8 text-center text-sm text-gray-400"},Fs={class:"mt-6 rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-100"},$s={class:"grid grid-cols-2 gap-4 text-sm lg:grid-cols-4"},Is={class:"mt-0.5 text-lg font-semibold text-gray-900"},Es={class:"mt-0.5 text-lg font-semibold text-gray-900"},Bs={class:"mt-0.5 text-lg font-semibold text-gray-900"},Ls={class:"mt-0.5 text-lg font-semibold text-gray-900"},Qs={key:0,class:"mt-5"},Gs={class:"relative h-2 rounded-full bg-gray-200"},Hs={class:"mt-1 flex justify-between text-[11px] text-gray-400"},zs={class:"mt-6 rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-100"},Js={class:"grid grid-cols-1 gap-x-8 gap-y-3 text-sm sm:grid-cols-2 lg:grid-cols-3"},Ws={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},Ys={class:"font-medium text-gray-900"},Ks={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},Xs=["title"],Zs={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},tr={class:"font-medium text-gray-900"},er={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},sr={class:"font-medium text-gray-900"},rr={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},dr={class:"font-medium text-gray-900"},or={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},ar={class:"font-medium text-gray-900"},lr={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},ir={class:"text-right font-medium text-gray-900"},nr={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},ur={class:"text-right font-medium text-gray-900"},mr={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},gr={class:"text-right font-medium text-gray-900"},xr={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},yr={class:"text-right font-medium text-gray-900"},cr={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},br={class:"font-medium text-gray-900"},fr={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},pr={class:"font-medium text-gray-900"},vr={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},wr=["title"],hr={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},kr=["title"],jr={class:"flex justify-between gap-4 border-b border-gray-50 pb-2"},Cr={class:"font-medium text-gray-900"},Sr={class:"mb-2 mt-6 text-sm font-semibold text-gray-700"},qr={key:0,class:"overflow-x-auto"},Vr={class:"min-w-full divide-y divide-gray-200 text-sm"},Ur={class:"bg-gray-50"},Nr={class:"divide-y divide-gray-100"},Ar=["title"],Dr={class:"px-3 py-2 text-gray-700"},Pr={class:"px-3 py-2 text-gray-700"},_r={key:1,class:"text-sm text-gray-400"},Tr={class:"mb-2 mt-6 text-sm font-semibold text-gray-700"},Rr={key:2,class:"flex flex-wrap gap-2"},Mr={class:"font-semibold uppercase"},Or={class:"text-gray-500"},Fr={key:3,class:"text-sm text-gray-400"},$r={class:"mb-2 mt-6 text-sm font-semibold text-gray-700"},Ir={key:4,class:"overflow-x-auto"},Er={class:"min-w-full divide-y divide-gray-200 text-sm"},Br={class:"divide-y divide-gray-100"},Lr={class:"px-3 py-2 text-gray-700"},Qr={class:"px-3 py-2 text-gray-700"},Gr={class:"px-3 py-2 text-gray-700"},Hr={class:"px-3 py-2 text-gray-500"},zr={key:5,class:"text-sm text-gray-400"},Jr={class:"p-6"},Wr={class:"mt-1 flex justify-between text-xs text-gray-400"},Yr={class:"mt-6 flex justify-end gap-3"},Kr=["disabled"],Xr={class:"p-6"},Zr={class:"mt-1 flex justify-between text-xs text-gray-400"},td={class:"mt-6 flex justify-end gap-3"},ed=["disabled"],qd={__name:"Show",props:{review:{type:Object,default:()=>({issues:[]})},record:{type:Object,default:()=>({images:[],translations:[],promotions:[]})},demand:{type:Object,default:()=>({total:0,requests:[],trend:{labels:[],data:[]},status_breakdown:{labels:[],data:[]}})},context:{type:Object,default:()=>({})},product:{type:Object,required:!0},categories:{type:Array,required:!0}},setup(s){const y=s,q=w(!1),l=w({...y.product}),G=i=>{if(!i)return"";try{if(Array.isArray(i))return i.join(", ");const e=JSON.parse(i);return Array.isArray(e)?e.join(", "):typeof e=="object"?JSON.stringify(e,null,2):i}catch{return i}},H=(i,e)=>{i.target.src===e.medium_url&&(i.target.src=e.original_url)},z=()=>{N.put(route("dashboard.admin.products.update",y.product.id),l.value,{onSuccess:()=>{q.value=!1}})},c=w(!1),A=w(!1),k=w(""),J=()=>
1{c.value=!0,N.post(route("dashboard.admin.products.approve",y.product.id),{},{preserveScroll:!0,onFinish:()=>c.value=!1})},W=()=>{c.value=!0,N.post(route("dashboard.admin.products.bulk-action"),{products:[y.product.id],action:"unpublish"},{preserveScroll:!0,onFinish:()=>c.value=!1})},Y=()=>{k.value="",A.value=!0},K=()=>{c.value=!0,N.post(route("dashboard.admin.products.reject",y.product.id),{rejection_reason:k.value.trim()||null},{preserveScroll:!0,onSuccess:()=>A.value=!1,onFinish:()=>c.value=!1})},D=w(!1),j=w(""),X=()=>{j.value="",D.value=!0},Z=()=>{j.value.trim()&&(c.value=!0,N.post(route("dashboard.admin.products.request-changes",y.product.id),{feedback:j.value.trim()},{preserveScroll:!0,onSuccess:()=>D.value=!1,onFinish:()=>c.value=!1}))},M=w(!1),tt=()=>{M.value=!0,N.post(route("dashboard.admin.products.ai-recommendation",y.product.id),{},{preserveScroll:!0,onFinish:()=>M.value=!1})},et={publish:"bg-green-100 text-green-800",pending:"bg-amber-100 text-amber-800",rejected:"bg-red-100 text-red-800",changes_requested:"bg-amber-100 text-amber-800",unpublish:"bg-gray-200 text-gray-700",draft:"bg-gray-100 text-gray-700"},st={publish:"Live on the marketplace",pending:"Pending review",rejected:"Rejected",changes_requested:"Changes requested",unpublish:"Unpublished",draft:"Draft"},rt={no_photos:"No photos",photos_missing:"Photo files missing from disk",no_price:"No price set",no_quantity:"No quantity available",expired:"Past its expiry date",rejected:"Rejected in review"},F=i=>{if(!i)return"-";const e=new Date(i);return Number.isNaN(e.getTime())?String(i):e.toLocaleString()},dt=R(()=>{var i,e;return{labels:((i=y.demand.trend)==null?void 0:i.labels)||[],datasets:[{label:"Quotation requests",data:((e=y.demand.trend)==null?void 0:e.data)||[],borderColor:"#006838",backgroundColor:"rgba(0, 104, 56, 0.12)",tension:.35,fill:!0,pointRadius:2}]}}),ot=R(()=>{var i;return(((i=y.demand.trend)==null?void 0:i.data)||[]).some(e=>e>0)}),at=R(()=>{var i,e;return{labels:((i=y.demand.status_breakdown)==null?void 0:i.labels)||[],datasets:[{data:((e=y.demand.status_breakdown)==null?void 0:e.data)||[],backgroundColor:["#006838","#f59e0b","#3b82f6","#ef4444","#8b5cf6","#64748b"]}]}}),b=R(()=>y.context||{}),I=R(()=>{var P,_,T;const i=Number(((P=b.value)==null?void 0:P.category_min_price)??0),e=Number(((_=b.value)==null?void 0:_.category_max_price)??0),V=Number(String(((T=y.product)==null?void 0:T.price)??"").replace(/,/g,""));return!e||e<=i||Number.isNaN(V)?null:Math.min(100,Math.max(0,(V-i)/(e-i)*100))});return(i,e)=>(o(),$(mt,null,{header:U(()=>[t("div",ct,[e[32]||(e[32]=t("h2",{class:"font-semibold text-xl text-gray-800 leading-tight"}," Product Details ",-1)),t("div",bt,[s.review.is_public&&s.product.public_url?(o(),a("a",{key:0,href:s.product.public_url,target:"_blank",rel:"noopener",class:"inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-xs font-semibold uppercase tracking-widest text-gray-700 hover:bg-gray-50"}," View live ",8,ft)):m("",!0),s.review.status!=="publish"?(o(),a("button",{key:1,onClick:J,disabled:c.value,class:"inline-flex items-center rounded-md border border-transparent bg-green-600 px-3 py-2 text-xs font-semibold uppercase tracking-widest text-white hover:bg-green-700 disabled:opacity-50"}," Approve ",8,pt)):m("",!0),s.review.status==="publish"?(o(),a("button",{key:2,onClick:W,disabled:c.value,class:"inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-xs font-semibold uppercase tracking-widest text-gray-700 hover:bg-gray-50 disabled:opacity-50"}," Unpublish ",8,vt)):m("",!0),s.review.status!=="rejected"?(o(),a("button",{key:3,onClick:Y,disabled:c.value,class:"inline-flex items-center rounded-md border border-transparent bg-red-600 px-3 py-2 text-xs font-semibold uppercase tracking-widest text-white hover:bg-red-700 disabled:opacity-50"}," Reject ",8,wt)):m("",!0),s.review.status!=="publish"?(o(),a("button",{key:4,onClick:X,disabled:c.value,class:"inline-flex items-center rounded-md border border-transparent bg-amber-500 px-3 py-2 text-xs font-semibold uppercase tracking-widest text-white hover:bg-amber-600 disabled:opacity-50"}," Send Feedback ",8,ht)):m("",!0),s.review.status!=="publish"?(o(),a("button",{key:5,onClick:tt,disabled:M.value,class:"inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-xs font-semibold uppercase tracking-widest text-gray-700 hover:bg-gray-50 disabled:opacity-50"},r(M.value?"Asking AIâ¦":s.review.ai_review_status?"Re-ask AI":"Get AI recommendation"),9,kt)):m("",!0),t("button",{onClick:e[0]||(e[0]=V=>q.value=!q.value),class:"inline-flex items-center px-4 py-2 bg-primary border border-transparent roun
1ded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-primary-dark"},r(q.value?"Cancel Edit":"Edit Product"),1)])])]),default:U(()=>{var V,P,_,T,E,B;return[t("div",jt,[t("div",Ct,[t("div",St,[t("div",qt,[t("div",null,[t("h3",Vt,r(s.product.name),1),t("p",Ut,[f(" Listing #"+r(s.record.id)+" ",1),s.record.slug?(o(),a("span",Nt," · "+r(s.record.slug),1)):m("",!0)])]),t("div",At,[t("span",{class:S(["inline-flex rounded-full px-3 py-1 text-sm font-semibold",et[s.review.status]||"bg-gray-100 text-gray-800"])},r(st[s.review.status]||s.review.status),3),t("p",{class:S(["mt-1 text-xs",s.review.is_public?"text-green-700":"text-gray-500"])},r(s.review.is_public?"Visible to buyers":"Not visible to buyers"),3)])]),s.review.status==="rejected"?(o(),a("div",Dt,[e[33]||(e[33]=t("p",{class:"text-sm font-semibold text-red-800"},"Reason sent to the seller",-1)),t("p",Pt,r(s.review.rejection_reason||"No reason was given."),1)])):m("",!0),s.review.status==="changes_requested"?(o(),a("div",_t,[e[34]||(e[34]=t("p",{class:"text-sm font-semibold text-amber-800"},"Feedback sent to the seller",-1)),t("p",Tt,r(s.review.reviewer_feedback),1)])):m("",!0),(V=s.review.issues)!=null&&V.length?(o(),a("div",Rt,[(o(!0),a(p,null,v(s.review.issues,d=>(o(),a("span",{key:d,class:"inline-flex items-center rounded-full bg-amber-50 px-2.5 py-1 text-xs font-medium text-amber-800"},r(rt[d]||d),1))),128))])):m("",!0),s.review.ai_review_status?(o(),a("div",{key:3,class:S(["mt-4 rounded-lg p-4",s.review.ai_review_status==="flagged"?"bg-amber-50":s.review.ai_review_status==="error"?"bg-gray-50":"bg-green-50"])},[t("p",{class:S(["text-sm font-semibold",s.review.ai_review_status==="flagged"?"text-amber-800":s.review.ai_review_status==="error"?"text-gray-700":"text-green-800"])},[f(" AI review: "+r(s.review.ai_review_status==="flagged"?"Flagged for your attention":s.review.ai_review_status==="error"?"Couldn't complete":s.review.status==="publish"?"Approved":"Recommends approving")+" ",1),s.review.ai_reviewed_at?(o(),a("span",Mt,"· "+r(n(x)(s.review.ai_reviewed_at)),1)):m("",!0)],2),t("p",{class:S(["mt-1 text-sm",s.review.ai_review_status==="flagged"?"text-amber-700":s.review.ai_review_status==="error"?"text-gray-600":"text-green-700"])},r(s.review.ai_review_reason),3)],2)):m("",!0),t("dl",Ot,[t("div",null,[e[35]||(e[35]=t("dt",{class:"text-gray-500"},"Created",-1)),t("dd",Ft,r(n(x)(s.record.created_at)),1)]),t("div",null,[e[36]||(e[36]=t("dt",{class:"text-gray-500"},"Last updated",-1)),t("dd",$t,r(n(x)(s.record.updated_at)),1)]),t("div",null,[e[37]||(e[37]=t("dt",{class:"text-gray-500"},"Reviewed",-1)),t("dd",It,r(n(x)(s.review.reviewed_at)),1)]),t("div",null,[e[38]||(e[38]=t("dt",{class:"text-gray-500"},"Reviewed by",-1)),t("dd",Et,r(s.review.reviewed_by||(s.review.reviewed_at?"Automatic":"-")),1)])])]),t("div",Bt,[t("div",Lt,[t("div",Qt,[t("div",Gt,[e[45]||(e[45]=t("h3",{class:"text-lg font-medium text-gray-900 mb-4 flex items-center"},[t("svg",{class:"w-5 h-5 mr-2 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})]),f(" Seller Information ")],-1)),t("div",Ht,[t("div",null,[e[39]||(e[39]=t("dt",{class:"text-sm font-medium text-gray-500"}," Seller Name ",-1)),t("dd",zt,[s.product.user?(o(),$(n(L),{key:0,href:i.route("dashboard.admin.sellers.show",s.product.user.id),class:"text-sm font-medium text-primary hover:underline"},{default:U(()=>[f(r(s.product.user.name),1)]),_:1},8,["href"])):(o(),a("span",Jt,"N/A"))])]),(P=s.product.user)!=null&&P.email?(o(),a("div",Wt,[e[40]||(e[40]=t("dt",{class:"text-sm font-medium text-gray-500"}," Email ",-1)),t("dd",Yt,[t("a",{href:`mailto:${s.product.user.email}`,class:"text-sm text-primary hover:underline"},r(s.product.user.email),9,Kt)])])):m("",!0),(_=s.product.user)!=null&&_.phone?(o(),a("div",Xt,[e[41]||(e[41]=t("dt",{class:"text-sm font-medium text-gray-500"}," Phone ",-1)),t("dd",Zt,[t("a",{href:`tel:${s.product.user.phone}`,class:"text-sm text-primary hover:underline"}," ("+r(s.product.country_code)+") "+r(s.product.user.phone),9,te)])])):m("",!0),(T=s.product.user)!=null&&T.organization_name?(o(),a("div",ee,[e[42]||(e[42]=t("dt",{class:"text-sm font-medium text-gray-500"}," Organization ",-1)),t("dd",se,r(s.product.user.organization_name),1)])):m("",!0),s.product.user.country?(o(),a("div",re,[e[43]||(e[43]=t("dt",{class:"text-sm font-medium text-gray-500"}," Country ",-1)),t("dd",de,r(s.product.user.country.flag)+" "+r(s.product.user.country.name),1)])):m("",!0),(E=s.product.user)!=null&&E.verification_status?(o(),a("div",oe,[e[44]||(e[44]=t("dt",{class:"text-sm font-medium text-gray-500"}," Verification Status ",-1)),t("dd",ae,[t("span",{class:S(["inline-flex px-2 py-1 text-xs font-semibold rounded-full",s.product.user.verification_status==="approved"?"bg-green-100 text-green-800":s.product.user.verification_status==="rejected"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"])},r(s.product.user.verification_status),3)])])):m("",!0)])]),s.product.user?(o(),a("div",le,[O(n(L),{href:i.route("dashboard.admin.sellers.show",s.product.user.id),class:"inline-flex items-center px-4 py-2 bg-gray-100 border border-gray-300 rounded-md font-semibold text-xs text-gray-700 uppercase tracking-widest hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-primary"},{default:U(()=>e[46]||(e[46]=[f(" View Full Profile "),t("svg",{class:"ml-2 w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])),_:1},8,["href"])])):m("",!0)])])]),t("div",ie,[t("div",ne,[q.value?(o(),a("form",{key:0,onSubmit:nt(z,["prevent"]),class:"space-y-8"},[t("div",ue,[e[52]||(e[52]=t("h3",{class:"text-lg font-medium text-gray-900 mb-4"}," Essential Information ",-1)),t("div",me,[t("div",null,[e[47]||(e[47]=t("label",{class:"block text-sm font-medium text-gray-700"},"Name",-1)),u(t("input",{type:"text","onUpdate:modelValue":e[1]||(e[1]=d=>l.value.name=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.name]])]),t("div",null,[e[48]||(e[48]=t("label",{class:"block text-sm font-medium text-gray-700"},"Category",-1)),u(t("select",{"onUpdate:modelValue":e[2]||(e[2]=d=>l.value.category_id=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},[(o(!0),a(p,null,v(s.categories,d=>(o(),a("option",{key:d.id,value:d.id},r(d.name),9,ge))),128))],512),[[lt,l.value.category_id]])]),t("div",xe,[e[49]||(e[49]=t("label",{class:"block text-sm font-medium text-gray-700"},"Description",-1)),u(t("textarea",{"onUpdate:modelValue":e[3]||(e[3]=d=>l.value.description=d),rows:"4",class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.description]])]),t("div",null,[e[50]||(e[50]=t("label",{class:"block text-sm font-medium text-gray-700"},"Price",-1)),u(t("input",{type:"number",step:"0.01","onUpdate:modelValue":e[4]||(e[4]=d=>l.value.price=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.price]])]),t("div",null,[e[51]||(e[51]=t("label",{class:"block text-sm font-medium text-gray-700"},"Price Unit",-1)),u(t("input",{type:"text","onUpdate:modelValue":e[5]||(e[5]=d=>l.value.price_unit=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.price_unit]])])])]),t("div",ye,[e[59]||(e[59]=t("h3",{class:"text-lg font-medium text-gray-900 mb-4"}," Quantity & Order Details ",-1)),t("div",ce,[t("div",null,[e[53]||(e[53]=t("label",{class:"block text-sm font-medium text-gray-700"},"Minimum Order",-1)),u(t("input",{type:"number",step:"0.01","onUpdate:modelValue":e[6]||(e[6]=d=>l.value.minimum_order=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.minimum_order]])]),t("div",null,[e[54]||(e[54]=t("label",{class:"block text-sm font-medium text-gray-700"},"Minimum Order Unit",-1)),u(t("input",{type:"text","onUpdate:modelValue":e[7]||
1(e[7]=d=>l.value.minimum_order_unit=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.minimum_order_unit]])]),t("div",null,[e[55]||(e[55]=t("label",{class:"block text-sm font-medium text-gray-700"},"Quantity Available",-1)),u(t("input",{type:"text","onUpdate:modelValue":e[8]||(e[8]=d=>l.value.quantity_available=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.quantity_available]])]),t("div",null,[e[56]||(e[56]=t("label",{class:"block text-sm font-medium text-gray-700"},"Quantity Unit",-1)),u(t("input",{type:"text","onUpdate:modelValue":e[9]||(e[9]=d=>l.value.quantity_unit=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.quantity_unit]])]),t("div",be,[e[57]||(e[57]=t("label",{class:"block text-sm font-medium text-gray-700"},"Payment Terms",-1)),u(t("textarea",{"onUpdate:modelValue":e[10]||(e[10]=d=>l.value.payment_terms=d),rows:"3",class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.payment_terms]])]),t("div",fe,[e[58]||(e[58]=t("label",{class:"block text-sm font-medium text-gray-700"},"Delivery Terms",-1)),u(t("textarea",{"onUpdate:modelValue":e[11]||(e[11]=d=>l.value.delivery_terms=d),rows:"3",class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.delivery_terms]])])])]),t("div",pe,[e[68]||(e[68]=t("h3",{class:"text-lg font-medium text-gray-900 mb-4"}," Product Specifications ",-1)),t("div",ve,[t("div",null,[e[60]||(e[60]=t("label",{class:"block text-sm font-medium text-gray-700"},"Variety",-1)),u(t("input",{type:"text","onUpdate:modelValue":e[12]||(e[12]=d=>l.value.variety=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.variety]])]),t("div",null,[e[61]||(e[61]=t("label",{class:"block text-sm font-medium text-gray-700"},"Grade",-1)),u(t("input",{type:"text","onUpdate:modelValue":e[13]||(e[13]=d=>l.value.grade=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.grade]])]),t("div",null,[e[62]||(e[62]=t("label",{class:"block text-sm font-medium text-gray-700"},"Growing Method",-1)),u(t("input",{type:"text","onUpdate:modelValue":e[14]||(e[14]=d=>l.value.growing_method=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.growing_method]])]),t("div",null,[e[63]||(e[63]=t("label",{class:"block text-sm font-medium text-gray-700"},"Region",-1)),u(t("input",{type:"text","onUpdate:modelValue":e[15]||(e[15]=d=>l.value.region=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.region]])]),t("div",null,[e[64]||(e[64]=t("label",{class:"block text-sm font-medium text-gray-700"},"Country of Origin",-1)),u(t("input",{type:"text","onUpdate:modelValue":e[16]||(e[16]=d=>l.value.country_of_origin=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.country_of_origin]])]),t("div",null,[e[65]||(e[65]=t("label",{class:"block text-sm font-medium text-gray-700"},"Available Months",-1)),u(t("input",{type:"text","onUpdate:modelValue":e[17]||(e[17]=d=>l.value.available_months=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.available_months]])]),t("div",null,[e[66]||(e[66]=t("label",{class:"block text-sm font-medium text-gray-700"},"Harvest Date",-1)),u(t("input",{type:"date","onUpdate:modelValue":e[18]||(e[18]=d=>l.value.harvest_date=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.harvest_date]])]),t("div",null,[e[67]||(e[67]=t("label",{class:"block text-sm font-medium text-gray-700"},"Expiry Date",-1)),u(t("input",{type:"date","onUpdate:modelValue":e[19]||(e[19]=d=>l.value.expiry_date=d),class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.expiry_date]])])])]),t("div",we,[e[73]||(e[73]=t("h3",{class:"text-lg font-medium text-gray-900 mb-4"}," Quality & Storage ",-1)),t("div",he,[t("div",null,[e[69]||(e[69]=t("label",{class:"block text-sm font-medium text-gray-700"},"Storage Conditions",-1)),u(t("textarea",{"onUpdate:modelValue":e[20]||(e[20]=d=>l.value.storage_conditions=d),rows:"3",class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.storage_conditions]])]),t("div",null,[e[70]||
1(e[70]=t("label",{class:"block text-sm font-medium text-gray-700"},"Packaging Details",-1)),u(t("textarea",{"onUpdate:modelValue":e[21]||(e[21]=d=>l.value.packaging_details=d),rows:"3",class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.packaging_details]])]),t("div",null,[e[71]||(e[71]=t("label",{class:"block text-sm font-medium text-gray-700"},"Certifications",-1)),u(t("textarea",{"onUpdate:modelValue":e[22]||(e[22]=d=>l.value.certifications=d),rows:"3",class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.certifications]])]),t("div",null,[e[72]||(e[72]=t("label",{class:"block text-sm font-medium text-gray-700"},"Processing Level",-1)),u(t("textarea",{"onUpdate:modelValue":e[23]||(e[23]=d=>l.value.processing_level=d),rows:"3",class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary"},null,512),[[g,l.value.processing_level]])])])]),t("div",null,[t("div",ke,[u(t("input",{type:"checkbox","onUpdate:modelValue":e[24]||(e[24]=d=>l.value.sample_available=d),class:"rounded border-gray-300 text-primary focus:ring-primary"},null,512),[[it,l.value.sample_available]]),e[74]||(e[74]=t("label",{class:"ml-2 block text-sm font-medium text-gray-700"},"Sample Available",-1))])]),t("div",je,[t("button",{type:"button",onClick:e[25]||(e[25]=d=>q.value=!1),class:"px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50"}," Cancel "),e[75]||(e[75]=t("button",{type:"submit",class:"px-4 py-2 bg-primary border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-primary-dark"}," Save Changes ",-1))])],32)):(o(),a("div",Ce,[t("div",Se,[e[82]||(e[82]=t("h3",{class:"text-lg font-medium text-gray-900 mb-4"}," Essential Information ",-1)),t("dl",qe,[t("div",Ve,[e[76]||(e[76]=t("dt",{class:"text-sm font-medium text-gray-500 mb-4"}," Product Images ",-1)),t("dd",Ue,[(o(!0),a(p,null,v(s.product.images,d=>(o(),a("div",{key:d.id,class:"relative"},[t("img",{src:d.medium_url,alt:s.product.name,class:"h-32 w-32 object-cover rounded-lg shadow-sm",onError:C=>H(C,d)},null,40,Ne)]))),128))])]),t("div",null,[e[77]||(e[77]=t("dt",{class:"text-sm font-medium text-gray-500"}," Name ",-1)),t("dd",Ae,r(s.product.name),1)]),t("div",null,[e[78]||(e[78]=t("dt",{class:"text-sm font-medium text-gray-500"}," Category ",-1)),t("dd",De,r((B=s.product.category)==null?void 0:B.name),1)]),t("div",Pe,[e[79]||(e[79]=t("dt",{class:"text-sm font-medium text-gray-500"}," Description ",-1)),t("dd",{class:"mt-1 text-sm text-gray-900",innerHTML:s.product.description},null,8,_e)]),t("div",null,[e[80]||(e[80]=t("dt",{class:"text-sm font-medium text-gray-500"}," Price ",-1)),t("dd",Te,r(n(gt)(s.product.price)),1)]),t("div",null,[e[81]||(e[81]=t("dt",{class:"text-sm font-medium text-gray-500"}," Currency ",-1)),t("dd",Re,r(s.product.price_unit),1)])])]),t("div",Me,[e[87]||(e[87]=t("h3",{class:"text-lg font-medium text-gray-900 mb-4"}," Quantity & Order Details ",-1)),t("dl",Oe,[t("div",null,[e[83]||(e[83]=t("dt",{class:"text-sm font-medium text-gray-500"}," Minimum Order ",-1)),t("dd",Fe,r(s.product.minimum_order)+" "+r(s.product.minimum_order_unit),1)]),t("div",null,[e[84]||(e[84]=t("dt",{class:"text-sm font-medium text-gray-500"}," Quantity Available ",-1)),t("dd",$e,r(s.product.quantity_available)+" "+r(s.product.quantity_unit),1)]),t("div",Ie,[e[85]||(e[85]=t("dt",{class:"text-sm font-medium text-gray-500"}," Payment Terms ",-1)),t("dd",Ee,r(n(h)(s.product.payment_terms,"payment")),1)]),t("div",Be,[e[86]||(e[86]=t("dt",{class:"text-sm font-medium text-gray-500"}," Delivery Terms ",-1)),t("dd",Le,r(n(h)(s.product.delivery_terms,"delivery")),1)])])]),t("div",Qe,[e[96]||(e[96]=t("h3",{class:"text-lg font-medium text-gray-900 mb-4"}," Product Specifications ",-1)),t("dl",Ge,[t("div",null,[e[88]||(e[88]=t("dt",{class:"text-sm font-medium text-gray-500"}," Variety ",-1)),t("dd",He,r(s.product.variety),1)]),t("div",null,[e[89]||(e[89]=t("dt",{class:"text-sm font-medium text-gray-500"}," Grade ",-1)),t("dd",ze,r(s.product.grade),1)]),t("div",null,[e[90]||(e[90]=t("dt",{class:"text-sm font-medium text-gray-500"}," Growing Method ",-1)),t("dd",Je,r(s.product.growing_method),1)]),t("div",null,[e[91]||(e[91]=t("dt",{class:"text-sm font-medium text-gray-500"}," Region ",-1)),t("dd",We,r(s.product.region),1)]),t("div",null,[e[92]||(e[92]=t("dt",{class:"text-sm font-medium text-gray-500"}," Country of Origin ",-1)),t("dd",Ye,[s.product.country?(o(),a("span",Ke,r(s.product.country.flag)+" "+r(s.product.country.name),1)):(o(),a("span",Xe,r(s.product.country_of_origin),1))])]),t("div",null,[e[93]||(e[93]=t("dt",{class:"text-sm font-medium text-gray-500"}," Available Months ",-1)),t("dd",Ze,r(G(s.product.available_months)),1)]),t("div",null,[e[94]||(e[94]=t("dt",{class:"text-sm font-medium text-gray-500"}," Harvest Date ",-1)),t("dd",ts,r(n(x)(s.product.harvest_date)),1)]),t("div",null,[e[95]||(e[95]=t("dt",{class:"text-sm font-medium text-gray-500"}," Expiry Date ",-1)),t("dd",es,r(n(x)(s.product.expiry_date)),1)])])]),t("div",ss,[e[101]||(e[101]=t("h3",{class:"text-lg font-medium text-gray-900 mb-4"}," Quality & Storage ",-1)),t("dl",rs,[t("div",null,[e[97]||(e[97]=t("dt",{class:"text-sm font-medium text-gray-500"}," Storage Conditions ",-1)),t("dd",ds,r(s.product.storage_conditions),1)]),t("div",null,[e[98]||(e[98]=t("dt",{class:"text-sm font-medium text-gray-500"}," Packaging Details ",-1)),t("dd",os,r(s.product.packaging_details),1)]),t("div",null,[e[99]||(e[99]=t("dt",{class:"text-sm font-medium text-gray-500"}," Certifications ",-1)),t("dd",as,r(n(h)(s.product.certifications,"certification")),1)]),t("div",null,[e[100]||(e[100]=t("dt",{class:"text-sm font-medium text-gray-500"}," Processing Level ",-1)),t("dd",ls,r(n(h)(s.product.processing_level,"processing")),1)])])]),t("div",null,[e[102]||(e[102]=t("dt",{class:"text-sm font-medium text-gray-500"}," Sample Available ",-1)),t("dd",is,r(s.product.sample_available?"Yes":"No"),1)])]))])]),t("div",ns,[e[111]||(e[111]=t("h3",{class:"mb-4 flex items-center text-base font-semibold text-gray-900"},[t("span",{class:"mr-3 inline-block h-5 w-1 rounded bg-[#006838]"}),f(" Buyer demand ")],-1)),t("div",us,[t("div",ms,[t("p",gs,r(s.demand.total),1),e[103]||(e[103]=t("p",{class:"text-sm text-gray-600"},"Quotation requests",-1))]),t("div",xs,[t("p",ys,r(s.demand.open),1),e[104]||(e[104]=t("p",{class:"text-sm text-gray-600"},"Still open",-1))]),t("div",cs,[t("p",bs,r(s.demand.quotes_received),1),e[105]||(e[105]=t("p",{class:"text-sm text-gray-600"},"Quotes sent back",-1))]),t("div",fs,[t("p",ps,r(s.demand.orders),1),e[106]||(e[106]=t("p",{class:"text-sm text-gray-600"},"Orders placed",-1))])]),s.demand.total?(o(),a("p",vs," First request "+r(n(x)(s.demand.first_request))+" · most recent "+r(n(x)(s.demand.last_request)),1)):m("",!0),s.demand.total?(o(),a("div",ws,[t("div",hs,[e[107]||(e[107]=t("h4",{class:"mb-3 text-sm font-semibold text-gray-700"},"Requests per month (last 12)",-1)),ot.value?(o(),$(xt,{key:0,data:dt.value},null,8,["data"])):(o(),a("p",ks," No requests in the last 12 months. "))]),t("div",null,[e[108]||(e[108]=t("h4",{class:"mb-3 text-sm font-semibold text-gray-700"},"By status",-1)),O(yt,{data:at.value},null,8,["data"])])])):m("",!0),s.demand.requests.length?(o(),a("div",js,[t("h4",Cs,[e[109]||(e[109]=f(" Buyers who requested a quotation ")),s.demand.total>s.demand.requests.length?(o(),a("span",Ss," (most recent "+r(s.demand.requests.length)+" of "+r(s.demand.total)+") ",1)):m("",!0)]),t("table",qs,[e[110]||(e[110]=t("thead",{class:"bg-gray-50"},[t("tr",null,[t("th",{class:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wider text-gray-500"},"Buyer"),t("th",{class:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wider text-gray-500"},"Quantity"),t("th",{class:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wider text-gray-500"},"Deliver to"),t("th",{class:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wider text-gray-500"},"Status"),t("th",{class:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wider text-gray-500"},"Quotes"),t("th",{class:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wider text-gray-500"},"Requested")])],-1)),t("tbody",Vs,[(o(!0),a(p,null,v(s.demand.requests,d=>(o(),a("tr",{key:d.id,class:"hover:bg-gray-50"},[t("td",Us,[t("span",Ns,r(d.buyer),1),d.is_guest?(o(),a("span",As,"guest")):m("",!0),t("span",Ds,r(d.buyer_email||"-"),1)]),t("td",Ps,r(d.quantity)+" "+r(d.quantity_unit),1),t("td",_s,r(d.delivery_location||"-"),1),t("td",Ts,r(d.status),1),t("td",Rs,r(d.quotes),1),t("td",{class:"whitespace-nowrap px-4 py-2 text-sm text-gray-500",title:F(d.created_at)},r(n(x)(d.created_at)),9,Ms)]))),128))])])])):m("",!0),s.demand.total?m("",!0):(o(),a("p",Os," No buyer has requested a quotation for this listing yet. "))]),t("div",Fs,[e[117]||(e[117]=t("h3",{class:"mb-4 flex items-center text-base font-semibold text-gray-900"},[t("span",{class:"mr-3 inline-block h-5 w-1 rounded bg-[#006838]"}),f(" How it compares ")],-1)),t("dl",$s,[t("div",null,[e[112]||(e[112]=t("dt",{class:"text-gray-500"},"Live listings in this category",-1)),t("dd",Is,r(b.value.category_listings),1)]),t("div",null,[e[113]||(e[113]=t("dt",{class:"text-gray-500"},"Category average price",-1)),t("dd",Es,"$"+r(b.value.category_avg_price),1)]),t("div",null,[e[114]||(e[114]=t("dt",{class:"text-gray-500"},"Category range",-1)),t("dd",Bs,"$"+r(b.value.category_min_price)+" â $"+r(b.value.category_max_price),1)]),t("div",null,[e[115]||(e[115]=t("dt",{class:"text-gray-500"},"This seller's listings",-1)),t("dd",Ls,r(b.value.seller_listings),1)])]),I.value!==null?(o(),a("div",Qs,[e[116]||(e[116]=t("p",{class:"mb-1 text-xs text-gray-500"},"Where this price sits in its category",-1)),t("div",Gs,[t("div",{class:"absolute -top-1 h-4 w-1 rounded bg-[#006838]",style:ut({left:I.value+"%"})},null,4)]),t("div",Hs,[t("span",null,"$"+r(b.value.category_min_price),1),t("span",null,"$"+r(b.value.category_max_price),1)])])):m("",!0)]),t("div",zs,[e[137]||(e[137]=t("h3",{class:"mb-4 flex items-center text-base font-semibold text-gray-900"},[t("span",{class:"mr-3 inline-block h-5 w-1 rounded bg-[#006838]"}),f(" Full record ")],-1)),t("dl",Js,[t("div",Ws,[e[118]||(e[118]=t("dt",{class:"text-gray-500"},"Product ID",-1)),t("dd",Ys,r(s.record.id),1)]),t("div",Ks,[e[119]||(e[119]=t("dt",{class:"text-gray-500"},"Slug",-1)),t("dd",{class:"truncate font-medium text-gray-900",title:s.record.slug},r(s.record.slug||"-"),9,Xs)]),t("div",Zs,[e[120]||(e[120]=t("dt",{class:"text-gray-500"},"Source locale",-1)),t("dd",tr,r(s.record.source_locale||"-"),1)]),t("div",er,[e[121]||(e[121]=t("dt",{class:"text-gray-500"}
1,"Seller ID",-1)),t("dd",sr,r(s.record.user_id),1)]),t("div",rr,[e[122]||(e[122]=t("dt",{class:"text-gray-500"},"Category ID",-1)),t("dd",dr,r(s.record.category_id),1)]),t("div",or,[e[123]||(e[123]=t("dt",{class:"text-gray-500"},"Country ID",-1)),t("dd",ar,r(s.record.country_of_origin||"-"),1)]),t("div",lr,[e[124]||(e[124]=t("dt",{class:"text-gray-500"},"Payment terms",-1)),t("dd",ir,r(n(h)(s.product.payment_terms,"payment")||"-"),1)]),t("div",nr,[e[125]||(e[125]=t("dt",{class:"text-gray-500"},"Delivery terms",-1)),t("dd",ur,r(n(h)(s.product.delivery_terms,"delivery")||"-"),1)]),t("div",mr,[e[126]||(e[126]=t("dt",{class:"text-gray-500"},"Certifications",-1)),t("dd",gr,r(n(h)(s.product.certifications,"certification")||"-"),1)]),t("div",xr,[e[127]||(e[127]=t("dt",{class:"text-gray-500"},"Processing level",-1)),t("dd",yr,r(n(h)(s.product.processing_level,"processing")||"-"),1)]),t("div",cr,[e[128]||(e[128]=t("dt",{class:"text-gray-500"},"Boosted",-1)),t("dd",br,r(s.record.is_boosted?"Yes":"No"),1)]),t("div",fr,[e[129]||(e[129]=t("dt",{class:"text-gray-500"},"Boost expires",-1)),t("dd",pr,r(n(x)(s.record.boost_expires_at)),1)]),t("div",vr,[e[130]||(e[130]=t("dt",{class:"text-gray-500"},"Created",-1)),t("dd",{class:"font-medium text-gray-900",title:F(s.record.created_at)},r(n(x)(s.record.created_at)),9,wr)]),t("div",hr,[e[131]||(e[131]=t("dt",{class:"text-gray-500"},"Updated",-1)),t("dd",{class:"font-medium text-gray-900",title:F(s.record.updated_at)},r(n(x)(s.record.updated_at)),9,kr)]),t("div",jr,[e[132]||(e[132]=t("dt",{class:"text-gray-500"},"Deleted",-1)),t("dd",Cr,r(s.record.deleted_at?n(x)(s.record.deleted_at):"-"),1)])]),t("h4",Sr," Photos ("+r(s.record.images.length)+") ",1),s.record.images.length?(o(),a("div",qr,[t("table",Vr,[t("thead",Ur,[t("tr",null,[e[133]||(e[133]=t("th",{class:"px-3 py-2 text-left text-xs font-medium uppercase text-gray-500"},"File",-1)),e[134]||(e[134]=t("th",{class:"px-3 py-2 text-left text-xs font-medium uppercase text-gray-500"},"Type",-1)),e[135]||(e[135]=t("th",{class:"px-3 py-2 text-left text-xs font-medium uppercase text-gray-500"},"Order",-1)),(o(),a(p,null,v(["original","large","medium","thumbnail"],d=>t("th",{key:d,class:"px-3 py-2 text-left text-xs font-medium uppercase text-gray-500"},r(d),1)),64))])]),t("tbody",Nr,[(o(!0),a(p,null,v(s.record.images,d=>(o(),a("tr",{key:d.id},[t("td",{class:"max-w-[18rem] truncate px-3 py-2 text-gray-700",title:d.path},r(d.path),9,Ar),t("td",Dr,r(d.type),1),t("td",Pr,r(d.order),1),(o(),a(p,null,v(["original","large","medium","thumbnail"],C=>t("td",{key:C,class:"px-3 py-2"},[t("span",{class:S(d.files[C]?"text-green-700":"text-red-600")},r(d.files[C]?"present":"missing"),3)])),64))]))),128))])])])):(o(),a("p",_r,"This listing has no photos on record.")),t("h4",Tr," Translations ("+r(s.record.translations.length)+") ",1),s.record.translations.length?(o(),a("div",Rr,[(o(!0),a(p,null,v(s.record.translations,d=>(o(),a("span",{key:d.locale,class:"inline-flex items-center gap-1 rounded-full bg-gray-100 px-2.5 py-1 text-xs text-gray-700"},[t("span",Mr,r(d.locale),1),t("span",Or,r(d.status),1)]))),128))])):(o(),a("p",Fr,"Not translated into any other language.")),t("h4",$r," Promotions ("+r(s.record.promotions.length)+") ",1),s.record.promotions.length?(o(),a("div",Ir,[t("table",Er,[e[136]||(e[136]=t("thead",{class:"bg-gray-50"},[t("tr",null,[t("th",{class:"px-3 py-2 text-left text-xs font-medium uppercase text-gray-500"},"Type"),t("th",{class:"px-3 py-2 text-left text-xs font-medium uppercase text-gray-500"},"Status"),t("th",{class:"px-3 py-2 text-left text-xs font-medium uppercase text-gray-500"},"Amount"),t("th",{class:"px-3 py-2 text-left text-xs font-medium uppercase text-gray-500"},"Runs")])],-1)),t("tbody",Br,[(o(!0),a(p,null,v(s.record.promotions,(d,C)=>(o(),a("tr",{key:C},[t("td",Lr,r(d.type),1),t("td",Qr,r(d.status),1),t("td",Gr,r(d.amount)+" "+r(d.currency),1),t("td",Hr,r(n(x)(d.starts_at))+" â "+r(n(x)(d.ends_at)),1)]))),128))])])])):(o(),a("p",zr,"This listing has never been promoted."))])])]),O(Q,{show:A.value,onClose:e[28]||(e[28]=d=>A.value=!1)},{default:U(()=>[t("div",Jr,[e[138]||(e[138]=t("h2",{class:"text-lg font-medium text-gray-900"},"Reject this listing?",-1)),e[139]||(e[139]=t("p",{class:"mt-1 text-sm text-gray-600"}," It will be removed from the marketplace and the seller will be emailed. A reason is optional; if you add one, the seller sees it on their dashboard and in the email. ",-1)),u(t("textarea",{"onUpdate:modelValue":e[26]||(e[26]=d=>k.value=d),rows:"4",maxlength:"1000",class:"mt-4 block w-full rounded-md border-gray-300 shadow-sm focus:border-[#006838] focus:ring-[#006838] sm:text-sm",placeholder:"e.g. The photos do not clearly show the produce."},null,512),[[g,k.value]]),t("div",Wr,[t("span",null,r(k.value.trim()?"The seller will receive this":"Leave blank to reject without a note"),1),t("span",null,r(k.value.length)+"/1000",1)]),t("div",Yr,[t("button",{type:"button",class:"rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50",onClick:e[27]||(e[27]=d=>A.value=!1)}," Cancel "),t("button",{type:"button",disabled:c.value,class:"rounded-md border border-transparent bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700 disabled:opacity-50",onClick:K},r(k.value.trim()?"Reject and send reason":"Reject without a reason"),9,Kr)])])]),_:1},8,["show"]),O(Q,{show:D.value,onClose:e[31]||(e[31]=d=>D.value=!1)},{default:U(()=>[t("div",Xr,[e[141]||(e[141]=t("h2",{class:"text-lg font-medium text-gray-900"},"Send feedback on this listing",-1)),e[142]||(e[142]=t("p",{class:"mt-1 text-sm text-gray-600"},' The listing is not rejected - it moves to "Changes requested" and the seller gets this note by email and on their dashboard, with a link to fix and resubmit. ',-1)),u(t("textarea",{"onUpdate:modelValue":e[29]||(e[29]=d=>j.value=d),rows:"4",maxlength:"2000",class:"mt-4 block w-full rounded-md border-gray-300 shadow-sm focus:border-[#006838] focus:ring-[#006838] sm:text-sm",placeholder:"e.g. Could you add a photo showing the packaging? Everything else looks good."},null,512),[[g,j.value]]),t("div",Zr,[e[140]||(e[140]=t("span",null,"A note is required so the seller knows what to change",-1)),t("span",null,r(j.value.length)+"/2000",1)]),t("div",td,[t("button",{type:"button",class:"rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50",onClick:e[30]||(e[30]=d=>D.value=!1)}," Cancel "),t("button",{type:"button",disabled:c.value||!j.value.trim(),class:"rounded-md border border-transparent bg-amber-500 px-4 py-2 text-sm font-medium text-white hover:bg-amber-600 disabled:opacity-50",onClick:Z}," Send feedback ",8,ed)])])]),_:1},8,["show"])]}),_:1}))}};export{qd 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.