PageSourceSearch

https://prwire.online/_next/static/chunks/pages/admin/website/home-4bcb9d158661f1a8.js

js prwire.online collected 2026-10-05 01:09:07 UTC 103,536 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3448],{28890:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/website/home",function(){return s(50797)}])},11990:function(e,t,s){"use strict";s.d(t,{Z:function(){return o}});var a=s(72253),r=s(14932),n=s(47702),i=s(85893),l=s(90512),c=s(23217);function o(e){var t=e.variant,s=e.size,o=e.isLoading,d=void 0!==o&&o,u=e.children,h=e.className,x=e.disabled,g=(0,n._)(e,["variant","size","isLoading","children","className","disabled"]);return(0,i.jsxs)("button",(0,r._)((0,a._)({className:(0,l.Z)("inline-flex items-center justify-center font-medium rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed",{primary:"bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-500",secondary:"bg-gray-100 text-gray-700 hover:bg-gray-200 focus:ring-gray-500",outline:"border border-gray-300 text-gray-700 hover:bg-gray-50 focus:ring-primary-500",danger:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",white:"bg-white text-slate-900 hover:bg-gray-100 focus:ring-white"}[void 0===t?"primary":t],{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"}[void 0===s?"md":s],h),disabled:x||d},g),{children:[d&&(0,i.jsx)(c.Z,{className:"w-4 h-4 mr-2 animate-spin"}),u]}))}},76753:function(e,t,s){"use strict";var a=s(72253),r=s(47702),n=s(85893),i=s(90512),l=(0,s(67294).forwardRef)(function(e,t){var s=e.label,l=e.error,c=e.className,o=e.id,d=(0,r._)(e,["label","error","className","id"]),u=o||d.name;return(0,n.jsxs)("div",{className:"space-y-1",children:[s&&(0,n.jsx)("label",{htmlFor:u,className:"block text-sm font-medium text-gray-700",children:s}),(0,n.jsx)("input",(0,a._)({ref:t,id:u,className:(0,i.Z)("block w-full px-3 py-2 border rounded-lg shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-offset-0 sm:text-sm",l?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 focus:ring-primary-500 focus:border-primary-500",c)},d)),l&&(0,n.jsx)("p",{className:"text-sm text-red-600",children:l})]})});l.displayName="Input",t.Z=l},77494:function(e,t,s){"use strict";var a=s(72253),r=s(47702),n=s(85893),i=s(90512),l=(0,s(67294).forwardRef)(function(e,t){var s=e.label,l=e.error,c=e.className,o=e.id,d=(0,r._)(e,["label","error","className","id"]),u=o||d.name;return(0,n.jsxs)("div",{className:"space-y-1",children:[s&&(0,n.jsx)("label",{htmlFor:u,className:"block text-sm font-medium text-gray-700",children:s}),(0,n.jsx)("textarea",(0,a._)({ref:t,id:u,className:(0,i.Z)("block w-full px-3 py-2 border rounded-lg shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-offset-0 sm:text-sm",l?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 focus:ring-primary-500 focus:border-primary-500",c),rows:4},d)),l&&(0,n.jsx)("p",{className:"text-sm text-red-600",children:l})]})});l.displayName="Textarea",t.Z=l},50797:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return z}});var a=s(11010),r=s(75766),n=s(72253),i=s(14932),l=s(24043),c=s(248),o=s(97582),d=s(85893),u=s(67294),h=s(81500),x=s(20034),g=s(52798),m=s(76753),p=s(77494),f=s(11990),b=s(41352),v=s(35162),y=s(24349),j=s(28463),N=s(95440),_=s(98082),w=s(56953),S=s(71408),C=s(15662),k=s(9560),Z=s(63715),P=s(46309),B=s(59994),T=s(73696),D=s(28142),R=s(31012),A=s(13718),E=s(84979),L=s(8971),F=s(75283),H=s(84443),I=s(87764),M=s(13742),O=["Monitor","Laptop","Smartphone","Tablet","Server","Database","Cloud","CloudUpload","CloudDownload","Wifi","Globe","Globe2","Earth","MapPin","Navigation","Compass","Map","Zap","Bolt","Lightning","Flame","Sun","Moon","Star","Sparkles","Sparkle","Heart","HeartHandshake","Handshake","Users","User","UserCheck","UserPlus","UserCircle","Shield","ShieldCheck","Lock","Unlock","Key","KeyRound","Fingerprint","Settings","Settings2","Cog","Wrench","Tool","Hammer","Screwdriver","Code","Code2","Terminal","FileCode","Braces","Binary","Bug","Rocket","Plane","Send","SendHorizonal","Navigation2","ArrowUpRight","TrendingUp","BarChart","BarChart2","BarChart3","PieChart","LineChart","Activity","DollarSign","Coins","Wallet","CreditCard","Banknote","PiggyBank","Receipt","ShoppingCart","ShoppingBag","Store","Package","G
1ift","Box","Archive","MessageCircle","MessageSquare","Mail","Inbox","AtSign","Bell","BellRing","Phone","PhoneCall","Video","Camera","Image","Images","GalleryHorizontal","FileText","File","Files","Folder","FolderOpen","Clipboard","ClipboardList","Calendar","CalendarDays","Clock","Timer","Hourglass","Watch","Alarm","Search","SearchCheck","Eye","EyeOff","Scan","Focus","Target","Lightbulb","Lamp","Sun","Sunrise","Sunset","Flashlight","Award","Trophy","Medal","Crown","BadgeCheck","Certificate","Ribbon","ThumbsUp","ThumbsDown","SmilePlus","Smile","Meh","Frown","Headphones","Mic","Volume2","Music","Radio","Podcast","Bookmark","BookOpen","Book","Library","GraduationCap","School","Building","Building2","Home","Castle","Factory","Warehouse","Hotel","Car","Truck","Bus","Train","Ship","Bike","Fuel","Leaf","Trees","Flower","Sprout","TreePine","Mountain","Waves","Coffee","UtensilsCrossed","ChefHat","Pizza","Apple","Cookie","Dumbbell","HeartPulse","Stethoscope","Pill","Syringe","Thermometer","Palette","Brush","Pen","Pencil","Edit","Edit2","Edit3","Link","Link2","Unlink","ExternalLink","Share","Share2","Download","Upload","UploadCloud","DownloadCloud","RefreshCw","RotateCw","Play","Pause","Stop","SkipForward","SkipBack","FastForward","Rewind","PlusCircle","MinusCircle","CheckCircle","XCircle","AlertCircle","Info","HelpCircle","Cpu","HardDrive","MemoryStick","Usb","Battery","BatteryCharging","Power","Printer","Scan","Scanner","CreditCard","QrCode","Barcode","LifeBuoy","Anchor","Umbrella","Glasses","Watch","Gem","Diamond","Megaphone","Radio","Tv","Monitor","Cast","Airplay","Bluetooth","Hash","AtSign","Asterisk","Percent","Equal","Infinity","CircleDot","Circle","Square","Triangle","Pentagon","Hexagon","Octagon"];function U(e){var t,s=e.value,a=e.onChange,r=e.label,n=(0,l._)((0,u.useState)(!1),2),i=n[0],c=n[1],o=(0,l._)((0,u.useState)(""),2),h=o[0],x=o[1],g=(0,u.useRef)(null),m=O.filter(function(e){return e.toLowerCase().includes(h.toLowerCase())});(0,u.useEffect)(function(){var e=function(e){g.current&&!g.current.contains(e.target)&&c(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var p=(t=H[s])?(0,d.jsx)(t,{className:"w-5 h-5"}):null;return(0,d.jsxs)("div",{className:"relative",ref:g,children:[r&&(0,d.jsx)("label",{className:"block mb-1.5 text-sm font-medium text-gray-700",children:r}),(0,d.jsxs)("button",{type:"button",onClick:function(){return c(!i)},className:"flex items-center gap-2 w-full px-3 py-2.5 bg-white border border-gray-200 rounded-lg hover:border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-all",children:[(0,d.jsx)("div",{className:"flex items-center justify-center w-8 h-8 bg-orange-50 rounded-lg text-orange-500",children:p||(0,d.jsx)("span",{className:"text-gray-400",children:"?"})}),(0,d.jsx)("span",{className:"flex-1 text-left text-sm text-gray-700",children:s||"Select icon"}),(0,d.jsx)("svg",{className:"w-4 h-4 text-gray-400 transition-transform ".concat(i?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),i&&(0,d.jsxs)("div",{className:"absolute z-50 w-80 mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:[(0,d.jsx)("div",{className:"p-3 border-b border-gray-100",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)(I.Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),(0,d.jsx)("input",{type:"text",value:h,onChange:function(e){return x(e.target.value)},placeholder:"Search icons...",className:"w-full pl-9 pr-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),h&&(0,d.jsx)("button",{onClick:function(){return x("")},className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:(0,d.jsx)(b.Z,{className:"w-4 h-4"})})]})}),(0,d.jsxs)("div",{className:"max-h-64 overflow-y-auto p-2",children:[(0,d.jsx)("div",{className:"grid grid-cols-6 gap-1",children:m.map(function(e){var t=H[e];if(!t)return null;var r=s===e;return(0,d.jsxs)("button",{type:"button",onClick:function(){a(e),c(!1),x("")},className:"relative flex items-center justify-center w-10 h-10 rounded-lg transition-all ".concat(r?"bg-orange-500 text-white":"hover:bg-gray-100 text-gray-600"),title:e,children:[(0,d.jsx)(t,{className:"w-5 h-5"}),r&&(0,d.jsx)(M.Z,{className:"absolute -top-1 -right-1 w-3 h-3 text-white bg-green-500 rounded-full p-0.5"})]},e)})}),0===m.length&&(0,d.jsxs)("div",{className:"py-8 text-center text-sm text-gray-500",children:['No icons foun
1d for "',h,'"']})]}),(0,d.jsx)("div",{className:"p-2 border-t border-gray-100 bg-gray-50 rounded-b-lg",children:(0,d.jsxs)("p",{className:"text-xs text-gray-500 text-center",children:[m.length," icons available"]})})]})]})}var W=s(90512);function J(e){var t=e.message,s=e.type,a=e.onClose;return(0,u.useEffect)(function(){var e=setTimeout(function(){a()},4e3);return function(){return clearTimeout(e)}},[a]),(0,d.jsxs)("div",{className:(0,W.Z)("p-4 rounded-lg text-sm flex items-center justify-between","success"===s&&"bg-green-50 text-green-600","error"===s&&"bg-red-50 text-red-600","info"===s&&"bg-blue-50 text-blue-600"),children:[(0,d.jsx)("span",{children:t}),(0,d.jsx)("button",{onClick:a,className:"ml-4 hover:opacity-70",children:(0,d.jsx)(b.Z,{className:"w-4 h-4"})})]})}var G=[{id:"hero",name:"Hero Section",icon:v.Z},{id:"best-seller",name:"Best Seller Section",icon:y.Z},{id:"product",name:"Product Section",icon:j.Z},{id:"count",name:"Count Section",icon:N.Z},{id:"brand-awareness",name:"Brand Awareness Section",icon:_.Z},{id:"get-in-touch",name:"Get In Touch Section",icon:w.Z},{id:"our-services",name:"Our Services Section",icon:S.Z},{id:"cta",name:"CTA Section",icon:C.Z},{id:"reviews",name:"Reviews Section",icon:k.Z},{id:"blog",name:"Blog Section",icon:Z.Z},{id:"brands",name:"Brands Section",icon:P.Z},{id:"popup",name:"Popup & Footer Card",icon:B.Z}];function z(){var e=(0,l._)((0,u.useState)("hero"),2),t=e[0],s=e[1];return(0,d.jsx)(h.Z,{requireAdmin:!0,children:(0,d.jsx)(x.Z,{children:(0,d.jsxs)("div",{className:"space-y-6",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Home Page Settings"}),(0,d.jsx)("p",{className:"text-gray-600",children:"Manage your homepage sections and content"})]}),(0,d.jsxs)("div",{className:"flex gap-6",children:[(0,d.jsx)("div",{className:"flex-shrink-0 w-64",children:(0,d.jsxs)("div",{className:"overflow-hidden bg-white border border-gray-200 rounded-lg",children:[(0,d.jsx)("div",{className:"p-3 border-b border-gray-200 bg-gray-50",children:(0,d.jsx)("h3",{className:"text-sm font-semibold text-gray-700",children:"Sections"})}),(0,d.jsx)("nav",{className:"p-2 space-y-1",children:G.map(function(e){var a=e.icon;return(0,d.jsxs)("button",{onClick:function(){return s(e.id)},className:(0,W.Z)("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-colors text-left",t===e.id?"bg-primary-50 text-primary-700 border border-primary-200":"text-gray-600 hover:bg-gray-50 hover:text-gray-900"),children:[(0,d.jsx)(a,{className:(0,W.Z)("w-4 h-4 flex-shrink-0",t===e.id?"text-primary-600":"text-gray-400")}),(0,d.jsx)("span",{className:"truncate",children:e.name.replace(" Section","")})]},e.id)})})]})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)("div",{className:"card",children:function(){switch(t){case"hero":default:return(0,d.jsx)(Y,{});case"best-seller":return(0,d.jsx)(q,{});case"product":return(0,d.jsx)(V,{});case"count":return(0,d.jsx)($,{});case"brand-awareness":return(0,d.jsx)(K,{});case"get-in-touch":return(0,d.jsx)(X,{});case"our-services":return(0,d.jsx)(Q,{});case"cta":return(0,d.jsx)(ee,{});case"reviews":return(0,d.jsx)(et,{});case"blog":return(0,d.jsx)(er,{});case"brands":return(0,d.jsx)(es,{});case"popup":return(0,d.jsx)(ea,{})}}()})})]})]})})})}function Y(){var e,t,s,c,h=(0,l._)((0,u.useState)(!0),2),x=h[0],v=h[1],y=(0,l._)((0,u.useState)(!1),2),j=y[0],N=y[1],_=(0,l._)((0,u.useState)(!1),2),w=_[0],S=_[1],C=(0,l._)((0,u.useState)({type:"",text:""}),2),k=C[0],Z=C[1],P=(0,u.useRef)(null),B=(0,l._)((0,u.useState)({subtitle:"",title:"",highlight_text:"",paragraph:"",button1_text:"",button1_link:"",button2_text:"",button2_link:"",hero_image:""}),2),R=B[0],A=B[1];(0,u.useEffect)(function(){E()},[]);var E=(e=(0,a._)(function(){var e,t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,g.h.getAdminHomeSection("hero")];case 1:return(t=s.sent()).success&&(null===(e=t.data)||void 0===e?void 0:e.section_data)&&A(t.data.section_data),[3,4];case 2:return s.sent(),[3,4];case 3:return v(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),L=function(e){var t=e.target,s=t.name,a=t.value;A(function(e){return(0,i._)((0,n._)({},e),(0,r._)({},s,a))})},F=(t=(0,a._)(function(e){var t,s,a;return(0,o.Jh)(this,function(r){switch(r.label){case 0:if(!(s=null===(t=e.target.files)||void 0===t?void 0:t[0]))return[2];S(!0),Z({type:"",text:""}),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,g.h.uploadHomeSectionImage(s,"hero","hero_image")];case 2:return(a=r.sent()).success?(A(function(e){return(0,i._)((0,n._)({},e),{hero_image:a.data.url})}),Z({type:"success",text:"Image uploaded successfully!"})):Z({type:"error",text:a.message||"Failed to upload image"}),[3,5];case 3:return Z({type:"error",text:r.sent().message||"Failed to upload image"}),[3,5];case 4:return S(!1),[7];case 5:return[2]}})}),function(e){return t.apply(this,arguments)}),H=(s=(0,a._)(function(e){var t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:e.preventDefault(),N(!0),Z({type:"",text:""}),s.label=1;case 1:return s.trys.push([1,3,4,5]),[4,g.h.updateHomeSection({section_key:"hero",section_data:R,is_active:!0,sort_order:1})];case 2:return(t=s.sent()).success?Z({type:"success",text:"Hero section saved successfully!"}):Z({type:"error",text:t.message||"Failed to save hero section"}),[3,5];case 3:return Z({type:"error",text:s.sent().message||"Failed to save hero section"}),[3,5];case 4:return N(!1),[7];case 5:return[2]}})}),function(e){return s.apply(this,arguments)});return x?(0,d.jsx)("div",{className:"flex justify-center py-12",children:(0,d.jsx)("div",{className:"w-12 h-12 border-b-2 roun
1ded-full animate-spin border-primary-600"})}):(0,d.jsxs)("form",{onSubmit:H,className:"space-y-6",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Hero Section"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Configure the main hero banner of your homepage."})]}),(0,d.jsxs)(f.Z,{type:"submit",isLoading:j,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),"Save Changes"]})]}),k.text&&(0,d.jsx)("div",{className:(0,W.Z)("p-4 rounded-lg text-sm","success"===k.type?"bg-green-50 text-green-600":"bg-red-50 text-red-600"),children:k.text}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)(m.Z,{label:"Subtitle",name:"subtitle",value:R.subtitle,onChange:L,placeholder:"e.g., CRYPTO PRESS RELEASE SERVICE"}),(0,d.jsx)(m.Z,{label:"Main Title",name:"title",value:R.title,onChange:L,placeholder:"e.g., Be Seen, Be Heard, In The Crypto World"}),(0,d.jsx)(m.Z,{label:"Highlight Text (text to highlight in title)",name:"highlight_text",value:R.highlight_text,onChange:L,placeholder:"e.g., Crypto World"}),(0,d.jsx)(p.Z,{label:"Paragraph",name:"paragraph",value:R.paragraph,onChange:L,placeholder:"Description text below the title...",rows:3})]}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,d.jsx)(m.Z,{label:"Button 1 Text",name:"button1_text",value:R.button1_text,onChange:L,placeholder:"e.g., Get Started"}),(0,d.jsx)(m.Z,{label:"Button 1 Link",name:"button1_link",value:R.button1_link,onChange:L,placeholder:"e.g., /services"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,d.jsx)(m.Z,{label:"Button 2 Text",name:"button2_text",value:R.button2_text,onChange:L,placeholder:"e.g., Connect on Telegram"}),(0,d.jsx)(m.Z,{label:"Button 2 Link",name:"button2_link",value:R.button2_link,onChange:L,placeholder:"e.g., https://t.me/..."})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"Hero Image"}),(0,d.jsx)("input",{type:"file",ref:P,onChange:F,accept:"image/*",className:"hidden"}),R.hero_image?(0,d.jsxs)("div",{className:"relative p-4 border-2 border-gray-300 border-dashed rounded-lg bg-gray-50",children:[(0,d.jsx)("img",{src:R.hero_image,alt:"Hero preview",className:"object-contain mx-auto rounded max-h-48",onError:function(e){e.target.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%23f3f4f6" width="100" height="100"/><text x="50%" y="50%" fill="%239ca3af" font-size="12" text-anchor="middle" dy=".3em">Image Error</text></svg>'}}),(0,d.jsxs)("div",{className:"flex justify-center gap-2 mt-3",children:[(0,d.jsxs)("button",{type:"button",onClick:function(){var e;return null===(e=P.current)||void 0===e?void 0:e.click()},className:"px-3 py-1.5 text-sm bg-white border border-gray-300 rounded-lg hover:bg-gray-50 flex items-center gap-1",children:[(0,d.jsx)(D.Z,{className:"w-4 h-4"}),"Replace"]}),(0,d.jsxs)("button",{type:"button",onClick:function(){A(function(e){return(0,i._)((0,n._)({},e),{hero_image:""})}),P.current&&(P.current.value="")},className:"px-3 py-1.5 text-sm bg-white border border-red-300 text-red-600 rounded-lg hover:bg-red-50 flex items-center gap-1",children:[(0,d.jsx)(b.Z,{className:"w-4 h-4"}),"Remove"]})]})]}):(0,d.jsx)("button",{type:"button",onClick:function(){var e;return null===(e=P.current)||void 0===e?void 0:e.click()},disabled:w,className:"w-full p-8 transition-colors border-2 border-gray-300 border-dashed rounded-lg cursor-pointer hover:border-primary-400 hover:bg-primary-50",children:(0,d.jsx)("div",{className:"flex flex-col items-center gap-2",children:w?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"w-8 h-8 border-b-2 rounded-full animate-spin border-primary-600"}),(0,d.jsx)("span",{className:"text-sm text-gray-500",children:"Uploading..."})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(D.Z,{className:"w-8 h-8 text-gray-400"}),(0,d.jsx)("span",{className:"text-sm font-medium text-gray-600",children:"Click to upload image"}),(0,d.jsx)("span",{className:"text-xs text-gray-400",children:"PNG, JPG, GIF, WebP up to 5MB"})]})})})]})]})]}),(0,d.jsxs)("div",{className:"pt-6 border-t",children:[(0,d.jsx)("h3",{className:"mb-4 text-sm font-medium text-gray-700",children:"Preview"}),(0,d.jsx)("div",{className:"p-8 rounded-lg bg-gradient-to-r from-orange-50 to-transparent",children:(0,d.jsxs)("div",{className:"flex flex-col items-center gap-8 lg:flex-row",children:[(0,d.jsxs)("div",{className:"flex-1 space-y-4",children:[R.subtitle&&(0,d.jsx)("span",{className:"inline-block px-3 py-1 text-xs font-semibold tracking-wider text-orange-600 uppercase bg-orange-100 rounded-full",children:R.subtitle}),(0,d.jsx)("h1",{className:"text-3xl font-bold text-gray-900",children:null===(c=R.title)||void 0===c?void 0:c.split(R.highlight_text||"___NOSPLIT___").map(function(e,t,s){return(0,d.jsxs)("span",{children:[e,t<s.length-1&&(0,d.jsx)("span",{className:"text-orange-500",children:R.highlight_text})]},t)})}),(0,d.jsx)("p",{className:"text-gray-600",children:R.paragraph}),(0,d.jsxs)("div",{className:"flex gap-3",children:[R.button1_text&&(0,d.jsx)("button",{className:"px-6 py-2 font-medium text-white bg-orange-500 rounded-lg",children:R.button1_text}),R.button2_text&&(0,d.jsxs)("button",{className:"px-6 py-2 font-medium text-gray-700 border border-gray-300 rounded-lg",children:[R.button2_text," →"]})]})]}),R.hero_image&&(0,d.jsx)("div",{className:"flex-1",children:(0,d.jsx)("img",{src:R.hero_image,alt:"Hero",className:"object-contain max-h-64"})})]})})]})]})}function q(){var e,t,s,c,h=(0,l._)((0,u.useState)(!0),2),x=h[0],v=h[1],y=(0,l._)((0,u.useState)(!1),2),j=y[0],N=y[1],_=(0,l._)((0,u.useState)(!1),2),w=_[0],S=_[1],C=(0,l._)((0,u.useState)({type:"",text:""}),2),k=C[0],Z=C[1],P=(0,u.useRef)(null),B=(0,l._)((0,u.useState)({badge_text:"",title:"",highlight_text:"",description:"",stat1_title:"",stat1_text:"",stat2_title:"",stat2_text:"",bullet1:"",bullet2:"",button_text:"",button_link:"",price:"",image:""}),2),R=B[0],A=B[1];(0,u.useEffect)(function(){E()},[]);var E=(e=(0,a._)(function(){var e,t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,g.h.getAdminHomeSection("best-seller")];case 1:return(t=s.sent()).success&&(null===(e=t.data)||void 0===e?void 0:e.section_data)&&A(function(e){return(0,n._)({},e,t.data.section_data)}),[3,4];case 2:return s.sent(),[3,4];case 3:return v(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),L=function(e){var t=e.target,s=t.name,a=t.value;A(function(e){return(0,i._)((0,n._)({},e),(0,r._)({},s,a))})},F=(t=(0,a._)(function(e){var t,s,a;return(0,o.Jh)(this,function(r){switch(r.label){case 0:if(!(s=null===(t=e.target.files)||void 0===t?void 0:t[0]))return[2];S(!0),Z({type:"",text:""}),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,g.h.uploadHomeSectionImage(s,"best-seller","image")];case 2:return(a=r.sent()).success?(A(function(e){return(0,i._)((0,n._)({},e),{image:a.data.url})}),Z({type:"success",text:"Image uploaded successfully!"})):Z({type:"error",text:a.message||"Failed to upload image"}),[3,5];case 3:return Z({type:"error",text:r.sent().message||"Failed to upload image"}),[3,5];case 4:return S(!1),[7];case 5:return[2]}})}),function(e){return t.apply(this,arguments)}),H=(s=(0,a._)(function(e){var t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:e.preventDefault(),N(!0),Z({type:"",text:""}),s.label=1;case 1:return s.trys.push([1,3,4,5]),[4,g.h.updateHomeSection({section_key:"best-seller",section_data:R,is_active:!0,sort_order:2})];case 2:return(t=s.sent()).success?Z({type:"success",text:"Best seller section saved successfully!"}):Z({type:"error",text:t.message||"Failed to save section"}),[3,5];case 3:return Z({type:"error",text:s.sent().message||"Failed to save section"}),[3,5];case 4:return N(!1),[7];case 5:return[2]}})}),function(e){return s.apply(this,arguments)});return x?(0,d.jsx)("div",{className:"flex justify-center py-12",children:(0,d.jsx)("div",{className:"w-12 h-12 border-b-2 roun
1ded-full animate-spin border-primary-600"})}):(0,d.jsxs)("form",{onSubmit:H,className:"space-y-6",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Best Seller Section"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Showcase your best selling product/service."})]}),(0,d.jsxs)(f.Z,{type:"submit",isLoading:j,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),"Save Changes"]})]}),k.text&&(0,d.jsx)("div",{className:(0,W.Z)("p-4 rounded-lg text-sm","success"===k.type?"bg-green-50 text-green-600":"bg-red-50 text-red-600"),children:k.text}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)(m.Z,{label:"Badge Text",name:"badge_text",value:R.badge_text,onChange:L,placeholder:"e.g., BEST SELLER"}),(0,d.jsx)(m.Z,{label:"Title",name:"title",value:R.title,onChange:L,placeholder:"e.g., Publish Press Release on Reuters"}),(0,d.jsx)(m.Z,{label:"Highlight Text (text to highlight in title)",name:"highlight_text",value:R.highlight_text,onChange:L,placeholder:"e.g., Reuters"}),(0,d.jsx)(p.Z,{label:"Description",name:"description",value:R.description,onChange:L,placeholder:"Description text...",rows:2}),(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,d.jsx)(m.Z,{label:"Price",name:"price",value:R.price,onChange:L,placeholder:"e.g., $1150"}),(0,d.jsx)(m.Z,{label:"Button Text",name:"button_text",value:R.button_text,onChange:L,placeholder:"e.g., Buy Now"})]}),(0,d.jsx)(m.Z,{label:"Button Link",name:"button_link",value:R.button_link,onChange:L,placeholder:"e.g., /services/reuters"})]}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"p-4 space-y-3 border rounded-lg",children:[(0,d.jsx)("h4",{className:"text-sm font-medium text-gray-700",children:"Stat Box 1"}),(0,d.jsx)(m.Z,{label:"Title",name:"stat1_title",value:R.stat1_title,onChange:L,placeholder:"e.g., SEO Power & Authority"}),(0,d.jsx)(p.Z,{label:"Description",name:"stat1_text",value:R.stat1_text,onChange:L,placeholder:"e.g., Reuters DA: 94 | PA: 83 | Spam Score: 1%",rows:2})]}),(0,d.jsxs)("div",{className:"p-4 space-y-3 border rounded-lg",children:[(0,d.jsx)("h4",{className:"text-sm font-medium text-gray-700",children:"Stat Box 2"}),(0,d.jsx)(m.Z,{label:"Title",name:"stat2_title",value:R.stat2_title,onChange:L,placeholder:"e.g., 104.9M+ Monthly Traffic"}),(0,d.jsx)(p.Z,{label:"Description",name:"stat2_text",value:R.stat2_text,onChange:L,placeholder:"e.g., Top Audiences: USA, UK, Canada, India, Germany",rows:2})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,d.jsx)(m.Z,{label:"Bullet Point 1",name:"bullet1",value:R.bullet1,onChange:L,placeholder:"e.g., Make Headlines with Reuters – Elevate Your Brand Today!"}),(0,d.jsx)(m.Z,{label:"Bullet Point 2",name:"bullet2",value:R.bullet2,onChange:L,placeholder:"e.g., Limited Slots Available – Secure Your Spot Now!"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"Product Image"}),(0,d.jsx)("input",{type:"file",ref:P,onChange:F,accept:"image/*",className:"hidden"}),R.image?(0,d.jsxs)("div",{className:"relative p-4 border-2 border-gray-300 border-dashed rounded-lg bg-gray-50",children:[(0,d.jsx)("img",{src:R.image,alt:"Best Seller preview",className:"object-contain mx-auto rounded max-h-32"}),(0,d.jsxs)("div",{className:"flex justify-center gap-2 mt-3",children:[(0,d.jsxs)("button",{type:"button",onClick:function(){var e;return null===(e=P.current)||void 0===e?void 0:e.click()},className:"px-3 py-1.5 text-sm bg-white border border-gray-300 rounded-lg hover:bg-gray-50 flex items-center gap-1",children:[(0,d.jsx)(D.Z,{className:"w-4 h-4"}),"Replace"]}),(0,d.jsxs)("button",{type:"button",onClick:function(){A(function(e){return(0,i._)((0,n._)({},e),{image:""})}),P.current&&(P.current.value="")},className:"px-3 py-1.5 text-sm bg-white border border-red-300 text-red-600 rounded-lg hover:bg-red-50 flex items-center gap-1",children:[(0,d.jsx)(b.Z,{className:"w-4 h-4"}),"Remove"]})]})]}):(0,d.jsx)("button",{type:"button",onClick:function(){var e;return null===(e=P.current)||void 0===e?void 0:e.click()},disabled:w,className:"w-full p-6 transition-colors border-2 border-gray-300 border-dashed rounded-lg cursor-pointer hover:border-primary-400 hover:bg-primary-50",children:(0,d.jsx)("div",{className:"flex flex-col items-center gap-2",children:w?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"w-6 h-6 border-b-2 roun
1ded-full animate-spin border-primary-600"}),(0,d.jsx)("span",{className:"text-sm text-gray-500",children:"Uploading..."})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(D.Z,{className:"w-6 h-6 text-gray-400"}),(0,d.jsx)("span",{className:"text-sm font-medium text-gray-600",children:"Click to upload"})]})})})]})]})]}),(0,d.jsxs)("div",{className:"pt-6 border-t",children:[(0,d.jsx)("h3",{className:"mb-4 text-sm font-medium text-gray-700",children:"Preview"}),(0,d.jsx)("div",{className:"p-8 rounded-lg bg-gradient-to-r from-gray-50 to-transparent",children:(0,d.jsxs)("div",{className:"flex flex-col items-center gap-8 lg:flex-row",children:[R.image&&(0,d.jsx)("div",{className:"flex-1",children:(0,d.jsx)("img",{src:R.image,alt:"Best Seller",className:"object-contain max-h-64"})}),(0,d.jsxs)("div",{className:"flex-1 space-y-4",children:[R.badge_text&&(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm font-semibold text-orange-500",children:["\uD83D\uDD25 ",R.badge_text," \uD83D\uDD25"]}),(0,d.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:null===(c=R.title)||void 0===c?void 0:c.split(R.highlight_text||"___NOSPLIT___").map(function(e,t,s){return(0,d.jsxs)("span",{children:[e,t<s.length-1&&(0,d.jsx)("span",{className:"text-primary-600",children:R.highlight_text})]},t)})}),(0,d.jsx)("p",{className:"text-sm text-gray-600",children:R.description}),(R.stat1_title||R.stat2_title)&&(0,d.jsxs)("div",{className:"flex gap-4",children:[R.stat1_title&&(0,d.jsxs)("div",{className:"flex-1 p-3 bg-white border rounded-lg",children:[(0,d.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:R.stat1_title}),(0,d.jsx)("div",{className:"mt-1 text-xs text-gray-500",children:R.stat1_text})]}),R.stat2_title&&(0,d.jsxs)("div",{className:"flex-1 p-3 bg-white border rounded-lg",children:[(0,d.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:R.stat2_title}),(0,d.jsx)("div",{className:"mt-1 text-xs text-gray-500",children:R.stat2_text})]})]}),(0,d.jsxs)("div",{className:"space-y-2",children:[R.bullet1&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-gray-700",children:[(0,d.jsx)("span",{className:"text-green-500",children:"✓"})," ",R.bullet1]}),R.bullet2&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-gray-700",children:[(0,d.jsx)("span",{className:"text-green-500",children:"✓"})," ",R.bullet2]})]}),R.button_text&&(0,d.jsxs)("button",{className:"px-6 py-2 font-medium text-white bg-orange-500 rounded-lg",children:[R.button_text," ",R.price&&"at ".concat(R.price)]})]})]})})]})]})}function V(){var e,t,s=(0,l._)((0,u.useState)(!0),2),r=s[0],n=s[1],i=(0,l._)((0,u.useState)(!1),2),h=i[0],x=i[1],p=(0,l._)((0,u.useState)({type:"",text:""}),2),v=p[0],y=p[1],j=(0,l._)((0,u.useState)([]),2),N=j[0],_=j[1],w=(0,l._)((0,u.useState)([]),2),S=w[0],C=w[1],k=(0,l._)((0,u.useState)("Our Products"),2),Z=k[0],P=k[1],B=(0,l._)((0,u.useState)("Choose from our range of services"),2),D=B[0],R=B[1];(0,u.useEffect)(function(){A()},[]);var A=(e=(0,a._)(function(){var e,t,s,a,r;return(0,o.Jh)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,3,4]),[4,Promise.all([g.h.getAdminServices(),g.h.getAdminHomeSection("product")])];case 1:return s=(t=l._.apply(void 0,[i.sent(),2]))[0],a=t[1],s.success&&_(s.data||[]),a.success&&(null===(e=a.data)||void 0===e?void 0:e.section_data)&&(C((r=a.data.section_data).selected_ids||[]),P(r.title||"Our Products"),R(r.subtitle||"Choose from our range of services")),[3,4];case 2:return i.sent(),[3,4];case 3:return n(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),E=function(e){C(function(t){return t.includes(e)?t.filter(function(t){return t!==e}):(0,c._)(t).concat([e])})},L=(t=(0,a._)(function(e){var t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:e.preventDefault(),x(!0),y({type:"",text:""}),s.label=1;case 1:return s.trys.push([1,3,4,5]),[4,g.h.updateHomeSection({section_key:"product",section_data:{title:Z,subtitle:D,selected_ids:S},is_active:!0,sort_order:3})];case 2:return(t=s.sent()).success?y({type:"success",text:"Product section saved successfully!"}):y({type:"error",text:t.message||"Failed to save section"}),[3,5];case 3:return y({type:"error",text:s.sent().message||"Failed to save section"}),[3,5];case 4:return x(!1),[7];case 5:return[2]}})}),function(e){return t.apply(this,arguments)});return r?(0,d.jsx)("div",{className:"flex justify-center py-12",children:(0,d.jsx)("div",{className:"w-12 h-12 border-b-2 roun
1ded-full animate-spin border-primary-600"})}):(0,d.jsxs)("form",{onSubmit:L,className:"space-y-6",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Product Section"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Select which products to display on the homepage."})]}),(0,d.jsxs)(f.Z,{type:"submit",isLoading:h,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),"Save Changes"]})]}),v.text&&(0,d.jsx)("div",{className:(0,W.Z)("p-4 rounded-lg text-sm","success"===v.type?"bg-green-50 text-green-600":"bg-red-50 text-red-600"),children:v.text}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,d.jsx)(m.Z,{label:"Section Title",value:Z,onChange:function(e){return P(e.target.value)},placeholder:"e.g., Our Products"}),(0,d.jsx)(m.Z,{label:"Section Subtitle",value:D,onChange:function(e){return R(e.target.value)},placeholder:"e.g., Choose from our range of services"})]}),(0,d.jsxs)("div",{className:"overflow-hidden border rounded-lg",children:[(0,d.jsx)("div",{className:"flex items-center justify-between px-4 py-3 border-b bg-gray-50",children:(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("input",{type:"checkbox",checked:S.length===N.length&&N.length>0,onChange:function(){S.length===N.length?C([]):C(N.map(function(e){return e.id}))},className:"w-4 h-4 border-gray-300 rounded text-primary-600 focus:ring-primary-500"}),(0,d.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select All (",S.length," of ",N.length," selected)"]})]})}),0===N.length?(0,d.jsx)("div",{className:"p-8 text-center text-gray-500",children:"No services found. Create services first to display them on the homepage."}):(0,d.jsx)("div",{className:"overflow-y-auto divide-y divide-gray-200 max-h-96",children:N.map(function(e){return(0,d.jsxs)("label",{className:(0,W.Z)("flex items-center gap-4 px-4 py-3 cursor-pointer transition-colors",S.includes(e.id)?"bg-primary-50":"hover:bg-gray-50"),children:[(0,d.jsx)("input",{type:"checkbox",checked:S.includes(e.id),onChange:function(){return E(e.id)},className:"w-4 h-4 border-gray-300 rounded text-primary-600 focus:ring-primary-500"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"font-medium text-gray-900",children:e.name}),e.is_popular&&(0,d.jsx)("span",{className:"px-2 py-0.5 text-xs bg-orange-100 text-orange-600 rounded-full",children:"Popular"}),e.show_home&&(0,d.jsx)("span",{className:"px-2 py-0.5 text-xs bg-green-100 text-green-600 rounded-full",children:"Show Home"})]}),(0,d.jsxs)("div",{className:"text-sm text-gray-500 flex items-center gap-3 mt-0.5",children:[(0,d.jsx)("span",{children:e.category}),(0,d.jsx)("span",{children:"•"}),(0,d.jsx)("span",{children:e.type}),(0,d.jsx)("span",{children:"•"}),(0,d.jsxs)("span",{className:"font-medium text-gray-700",children:["$",e.price]})]})]}),(0,d.jsx)("span",{className:(0,W.Z)("px-2.5 py-1 text-xs font-medium rounded-full","active"===e.status?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"),children:e.status})]},e.id)})})]}),S.length>0&&(0,d.jsxs)("div",{className:"pt-6 border-t",children:[(0,d.jsxs)("h3",{className:"mb-3 text-sm font-medium text-gray-700",children:["Selected Products (",S.length,")"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:S.map(function(e){var t=N.find(function(t){return t.id===e});return t?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-3 py-1 text-sm rounded-full bg-primary-100 text-primary-700",children:[t.name,(0,d.jsx)("button",{type:"button",onClick:function(){return E(e)},className:"ml-1 hover:text-primary-900",children:(0,d.jsx)(b.Z,{className:"w-3 h-3"})})]},e):null})})]})]})}function $(){var e,t,s=(0,l._)((0,u.useState)(!0),2),h=s[0],x=s[1],p=(0,l._)((0,u.useState)(!1),2),v=p[0],y=p[1],j=(0,l._)((0,u.useState)({type:"",text:""}),2),N=j[0],_=j[1],w=(0,l._)((0,u.useState)([{value:"94%",label:"Customer Satisfaction"},{value:"300+",label:"News Network"},{value:"100%",label:"Trust by Top Brands"},{value:"100+",label:"Happy Customers"},{value:"2,546",label:"PR Published"}]),2),S=w[0],C=w[1];(0,u.useEffect)(function(){k()},[]);var k=(e=(0,a._)(function(){var e,t,s;return(0,o.Jh)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),[4,g.h.getAdminHomeSection("count")];case 1:return(s=a.sent()).success&&(null===(t=s.data)||void 0===t?void 0:null===(e=t.section_data)||void 0===e?void 0:e.counters)&&C(s.data.section_data.counters),[3,4];case 2:return a.sent(),[3,4];case 3:return x(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),Z=function(e,t,s){C(function(a){return a.map(function(a,l){return l===e?(0,i._)((0,n._)({},a),(0,r._)({},t,s)):a})})}
1,P=function(e){S.length>1&&C(function(t){return t.filter(function(t,s){return s!==e})})},B=(t=(0,a._)(function(e){var t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:e.preventDefault(),y(!0),_({type:"",text:""}),s.label=1;case 1:return s.trys.push([1,3,4,5]),[4,g.h.updateHomeSection({section_key:"count",section_data:{counters:S},is_active:!0,sort_order:4})];case 2:return(t=s.sent()).success?_({type:"success",text:"Count section saved successfully!"}):_({type:"error",text:t.message||"Failed to save section"}),[3,5];case 3:return _({type:"error",text:s.sent().message||"Failed to save section"}),[3,5];case 4:return y(!1),[7];case 5:return[2]}})}),function(e){return t.apply(this,arguments)});return h?(0,d.jsx)("div",{className:"flex justify-center py-12",children:(0,d.jsx)("div",{className:"w-12 h-12 border-b-2 rounded-full animate-spin border-primary-600"})}):(0,d.jsxs)("form",{onSubmit:B,className:"space-y-6",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Count Section"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Display statistics and counters on the homepage."})]}),(0,d.jsxs)(f.Z,{type:"submit",isLoading:v,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),"Save Changes"]})]}),N.text&&(0,d.jsx)("div",{className:(0,W.Z)("p-4 rounded-lg text-sm","success"===N.type?"bg-green-50 text-green-600":"bg-red-50 text-red-600"),children:N.text}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("h3",{className:"text-sm font-medium text-gray-700",children:"Counter Items"}),S.length<6&&(0,d.jsx)("button",{type:"button",onClick:function(){S.length<6&&C(function(e){return(0,c._)(e).concat([{value:"",label:""}])})},className:"text-sm font-medium text-primary-600 hover:text-primary-700",children:"+ Add Counter"})]}),(0,d.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:S.map(function(e,t){return(0,d.jsxs)("div",{className:"relative p-4 bg-white border rounded-lg group",children:[S.length>1&&(0,d.jsx)("button",{type:"button",onClick:function(){return P(t)},className:"absolute p-1 text-gray-400 transition-opacity opacity-0 top-2 right-2 hover:text-red-500 group-hover:opacity-100",children:(0,d.jsx)(b.Z,{className:"w-4 h-4"})}),(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)(m.Z,{label:"Value",value:e.value,onChange:function(e){return Z(t,"value",e.target.value)},placeholder:"e.g., 94%, 300+, 2,546"}),(0,d.jsx)(m.Z,{label:"Label",value:e.label,onChange:function(e){return Z(t,"label",e.target.value)},placeholder:"e.g., Customer Satisfaction"})]})]},t)})})]}),(0,d.jsxs)("div",{className:"pt-6 border-t",children:[(0,d.jsx)("h3",{className:"mb-4 text-sm font-medium text-gray-700",children:"Preview"}),(0,d.jsx)("div",{className:"p-8 rounded-lg bg-gradient-to-r from-orange-500 to-orange-400",children:(0,d.jsx)("div",{className:"flex flex-wrap justify-center gap-8 md:gap-12",children:S.filter(function(e){return e.value||e.label}).map(function(e,t){return(0,d.jsxs)("div",{className:"text-center",children:[(0,d.jsx)("div",{className:"text-3xl font-bold text-white md:text-4xl",children:e.value}),(0,d.jsx)("div",{className:"mt-1 text-sm text-white/90",children:e.label})]},t)})})})]})]})}function K(){var e,t,s=(0,l._)((0,u.useState)(!0),2),h=s[0],x=s[1],v=(0,l._)((0,u.useState)(!1),2),y=v[0],j=v[1],N=(0,l._)((0,u.useState)({type:"",text:""}),2),_=N[0],w=N[1],S=(0,l._)((0,u.useState)("BASIC"),2),C=S[0],k=S[1],Z=(0,l._)((0,u.useState)({subtitle:"Maximize Brand Awareness",title:"Maximize Exposure With Our",highlight_text:"Crypto PR Packages",paragraph:"Illuminate Your Brand's Value Proposition With Our Meticulously-Devised Smart PR Package, A Beacon For Surging Awareness And Unrivaled Brand Proliferation.",packages:[{key:"BASIC",price:"$500",label:"Basic Crypto PR Package",emoji:"\uD83D\uDD2D",link:"/services",features:[{title:"Strong Foundational Exposure",desc:"Featured on CoinCentral, LiveBitcoinNews, Digital Journal, TechBullion, and MSN for credible early-stage visibility."},{title:"Balanced Web2 + Crypto",desc:"Reach targeted exposure across StreetInsider, Financial Content, and OpenPR, reaching crypto traders, investors, and fintech readers."}]},{key:"STANDARD",price:"$950",label:"Standard Crypto PR Package",emoji:"\uD83D\uDE80",link:"/services",features:[{title:"Broadened Network Reach",desc:"Includes all BASIC outlets plus targeted placements on Yahoo Finance, Benzinga, and MarketWatch for enhanced credibility."},{title:"Social Media Amplification",desc:"Basic social sharing on Twitter and Telegram networks to jumpstart community engagement."}]},{key:"ELITE",price:"$1,800",label:"Elite Crypto PR Package",emoji:"\uD83D\uDC51",link:"/services",features:[{title:"Premium Tier Publishers",desc:"Access to CoinTelegraph, BeInCrypto, and featured spots on Apple News and Google News."},{title:"Dedicated Account Manager",desc:"Personalized support for press release drafting, SEO optimization, and distribution strategy."}]},{key:"SUPREME",price:"$3,500",label:"Supreme Crypto PR Package",emoji:"\uD83D\uDC8E",link:"/services",features:[{title:"Tier-1 Global Dominance",desc:"Guaranteed publication on Reuters, Bloomberg, Nasdaq, and Forbes Council mentions."},{title:"Full-Spectrum Marketing",desc:"Includes influencer shoutouts, newsletter sponsorships, and comprehensive post-campaign analytics report."}]}]}),2),P=Z[0],B=Z[1];(0,u.useEffect)(function(){D()},[]);var D=(e=(0,a._)(function(){var e,t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,g.h.getAdminHomeSection("brand-awareness")];case 1:return(t=s.sent()).success&&(null===(e=t.data)||void 0===e?void 0:e.section_data)&&B(function(e){return(0,n._)({},e,t.data.section_data)}),[3,4];case 2:return s.sent(),[3,4];case 3:return x(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),F=function(e){var t=e.target,s=t.name,a=t.value;B(function(e){return(0,i._)((0,n._)({},e),(0,r._)({},s,a))})},H=function(e,t,s){B(function(a){return(0,i._)((0,n._)({},a),{packages:a.packages.map(function(a,l){return l===e?(0,i._)((0,n._)({},a),(0,r._)({},t,s)):a})})})},I=function(e,t,s,a){B(function(l){return(0,i._)((0,n._)({},l),{packages:l.packages.map(function(l,c){return c===e?(0,i._)((0,n._)({},l),{features:l.features.map(function(e,l){return l===t?(0,i._)((0,n._)({},e),(0,r._)({},s,a)):e})}):l})})})},M=function(e){B(function(t){return(0,i._)((0,n._)({},t),{packages:t.packages.map(function(t,s){return s===e?(0,i._)((0,n._)({},t),{features:(0,c._)(t.features).concat([{title:"",desc:""}])}):t})})})},O=function(e,t){B(function(s){return(0,i._)((0,n._)({}
1,s),{packages:s.packages.map(function(s,a){return a===e?(0,i._)((0,n._)({},s),{features:s.features.filter(function(e,s){return s!==t})}):s})})})},U=function(e){P.packages.length<=1||B(function(t){return(0,i._)((0,n._)({},t),{packages:t.packages.filter(function(t,s){return s!==e})})})},J=(t=(0,a._)(function(e){var t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:e.preventDefault(),j(!0),w({type:"",text:""}),s.label=1;case 1:return s.trys.push([1,3,4,5]),[4,g.h.updateHomeSection({section_key:"brand-awareness",section_data:P,is_active:!0,sort_order:5})];case 2:return(t=s.sent()).success?w({type:"success",text:"Brand awareness section saved successfully!"}):w({type:"error",text:t.message||"Failed to save section"}),[3,5];case 3:return w({type:"error",text:s.sent().message||"Failed to save section"}),[3,5];case 4:return j(!1),[7];case 5:return[2]}})}),function(e){return t.apply(this,arguments)});return h?(0,d.jsx)("div",{className:"flex justify-center py-12",children:(0,d.jsx)("div",{className:"w-12 h-12 border-b-2 rounded-full animate-spin border-primary-600"})}):(0,d.jsxs)("form",{onSubmit:J,className:"space-y-6",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Brand Awareness Section"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Configure the packages tabs section on the homepage."})]}),(0,d.jsxs)(f.Z,{type:"submit",isLoading:y,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),"Save Changes"]})]}),_.text&&(0,d.jsx)("div",{className:(0,W.Z)("p-4 rounded-lg text-sm","success"===_.type?"bg-green-50 text-green-600":"bg-red-50 text-red-600"),children:_.text}),(0,d.jsxs)("div",{className:"p-4 space-y-4 border rounded-lg",children:[(0,d.jsx)("h3",{className:"text-sm font-medium text-gray-700",children:"Section Header"}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,d.jsx)(m.Z,{label:"Subtitle",name:"subtitle",value:P.subtitle,onChange:F,placeholder:"e.g., Maximize Brand Awareness"}),(0,d.jsx)(m.Z,{label:"Highlight Text",name:"highlight_text",value:P.highlight_text,onChange:F,placeholder:"e.g., Crypto PR Packages"})]}
1),(0,d.jsx)(m.Z,{label:"Title (before highlight)",name:"title",value:P.title,onChange:F,placeholder:"e.g., Maximize Exposure With Our"}),(0,d.jsx)(p.Z,{label:"Paragraph",name:"paragraph",value:P.paragraph,onChange:F,placeholder:"Description text...",rows:2})]}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("h3",{className:"text-sm font-medium text-gray-700",children:["Packages (",P.packages.length,")"]}),(0,d.jsxs)("button",{type:"button",onClick:function(){var e="PACKAGE_".concat(P.packages.length+1);B(function(t){return(0,i._)((0,n._)({},t),{packages:(0,c._)(t.packages).concat([{key:e,price:"",label:"",emoji:"\uD83D\uDCE6",link:"/services",features:[{title:"",desc:""}]}])})}),k(e)},className:"flex items-center gap-1 text-sm font-medium text-primary-600 hover:text-primary-700",children:[(0,d.jsx)(R.Z,{className:"w-4 h-4"})," Add Package"]})]}),(0,d.jsx)("div",{className:"space-y-3",children:P.packages.map(function(e,t){return(0,d.jsxs)("div",{className:"overflow-hidden border rounded-lg",children:[(0,d.jsxs)("div",{className:(0,W.Z)("flex items-center justify-between px-4 py-3 cursor-pointer transition-colors",C===e.key?"bg-primary-50":"bg-gray-50 hover:bg-gray-100"),onClick:function(){return k(C===e.key?null:e.key)},children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("span",{className:"text-2xl",children:e.emoji}),(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"font-medium text-gray-900",children:e.key}),(0,d.jsxs)("span",{className:"ml-2 text-sm text-gray-500",children:["— ",e.price]})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[P.packages.length>1&&(0,d.jsx)("button",{type:"button",onClick:function(e){e.stopPropagation(),U(t)},className:"p-1 text-gray-400 hover:text-red-500",children:(0,d.jsx)(A.Z,{className:"w-4 h-4"})}),C===e.key?(0,d.jsx)(E.Z,{className:"w-5 h-5 text-gray-400"}):(0,d.jsx)(L.Z,{className:"w-5 h-5 text-gray-400"})]})]}),C===e.key&&(0,d.jsxs)("div",{className:"p-4 space-y-4 border-t",children:[(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-4",children:[(0,d.jsx)(m.Z,{label:"Tab Key",value:e.key,onChange:function(e){return H(t,"key",e.target.value.toUpperCase())},placeholder:"e.g., BASIC"}),(0,d.jsx)(m.Z,{label:"Price",value:e.price,onChange:function(e){return H(t,"price",e.target.value)},placeholder:"e.g., $500"}),(0,d.jsx)(m.Z,{label:"Emoji",value:e.emoji,onChange:function(e){return H(t,"emoji",e.target.value)},placeholder:"e.g., \uD83D\uDD2D"}),(0,d.jsx)(m.Z,{label:"Label",value:e.label,onChange:function(e){return H(t,"label",e.target.value)},placeholder:"e.g., Basic Crypto PR Package"})]}),(0,d.jsx)(m.Z,{label:"Button Link",value:e.link||"",onChange:function(e){return H(t,"link",e.target.value)},placeholder:"e.g., /services or /products/package-name"}),(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("h4",{className:"text-sm font-medium text-gray-600",children:"Features"}),(0,d.jsx)("button",{type:"button",onClick:function(){return M(t)},className:"text-xs text-primary-600 hover:text-primary-700",children:"+ Add Feature"})]}),e.features.map(function(s,a){return(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-gray-50",children:[(0,d.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,d.jsx)(m.Z,{label:"Feature Title",value:s.title,onChange:function(e){return I(t,a,"title",e.target.value)},placeholder:"Feature title..."}),(0,d.jsx)(p.Z,{label:"Feature Description",value:s.desc,onChange:function(e){return I(t,a,"desc",e.target.value)},placeholder:"Feature description...",rows:2})]}),e.features.length>1&&(0,d.jsx)("button",{type:"button",onClick:function(){return O(t,a)},className:"p-1 mt-6 text-gray-400 hover:text-red-500",children:(0,d.jsx)(b.Z,{className:"w-4 h-4"})})]},a)})]})]})]},t)})})]}),(0,d.jsxs)("div",{className:"pt-6 border-t",children:[(0,d.jsx)("h3",{className:"mb-4 text-sm font-medium text-gray-700",children:"Preview"}),(0,d.jsxs)("div",{className:"p-6 rounded-lg bg-gradient-to-b from-orange-50 to-white",children:[(0,d.jsxs)("div",{className:"mb-6",children:[(0,d.jsx)("span",{className:"block mb-2 text-xs font-bold tracking-widest text-orange-500 uppercase",children:P.subtitle}),(0,d.jsxs)("h2",{className:"text-xl font-bold text-gray-900",children:[P.title," ",(0,d.jsx)("span",{className:"text-orange-500",children:P.highlight_text})]}),(0,d.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:P.paragraph})]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2 mb-4",children:P.packages.map(function(e,t){return(0,d.jsx)("span",{className:(0,W.Z)("px-3 py-1.5 rounded-lg text-xs font-bold uppercase",0===t?"bg-orange-500 text-white":"bg-white border text-gray-600"),children:e.key},t)})}),P.packages[0]&&(0,d.jsxs)("div",{className:"p-4 bg-white border rounded-xl",children:[(0,d.jsxs)("div",{className:"flex items-center gap-4 mb-3",children:[(0,d.jsx)("span",{className:"text-3xl",children:P.packages[0].emoji}),(0,d.jsx)("div",{className:"text-2xl font-bold text-orange-500",children:P.packages[0].price})]}),P.packages[0].features.slice(0,2).map(function(e,t){return(0,d.jsxs)("div",{className:"flex gap-2 mb-2",children:[(0,d.jsx)("span",{className:"text-orange-500",children:"✓"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-sm font-medium text-gray-900",children:e.title}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:e.desc})]})]},t)})]})]})]})]})}function X(){var e,t,s=(0,l._)((0,u.useState)(!0),2),c=s[0],h=s[1],x=(0,l._)((0,u.useState)(!1),2),b=x[0],v=x[1],y=(0,l._)((0,u.useState)({type:"",text:""}),2),j=y[0],N=y[1],_=(0,l._)((0,u.useState)({subtitle:"Get In Touch",title:"Interested in harnessing the influence of",highlight_text:"The Media",paragraph:"Do you want to personalize your package or have an important industry announcement, please schedule a call or Fill Query Form for an assessment to potentially present it to journalists for news coverage.",button_text:"Book A Call Now",button_link:"/contact"}),2),w=_[0],S=_[1];(0,u.useEffect)(function(){C()},[]);var C=(e=(0,a._)(function(){var e,t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,g.h.getAdminHomeSection("get-in-touch")];case 1:return(t=s.sent()).success&&(null===(e=t.data)||void 0===e?void 0:e.section_data)&&S(function(e){return(0,n._)({},e,t.data.section_data)}),[3,4];case 2:return s.sent(),[3,4];case 3:return h(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),k=function(e){var t=e.target,s=t.name,a=t.value;S(function(e){return(0,i._)((0,n._)({},e),(0,r._)({},s,a))})},Z=(t=(0,a._)(function(e){var t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:e.preventDefault(),v(!0),N({type:"",text:""}),s.label=1;case 1:return s.trys.push([1,3,4,5]),[4,g.h.updateHomeSection({section_key:"get-in-touch",section_data:w,is_active:!0,sort_order:6})];case 2:return(t=s.sent()).success?N({type:"success",text:"Get in touch section saved successfully!"}):N({type:"error",text:t.message||"Failed to save section"}),[3,5];case 3:return N({type:"error",text:s.sent().message||"Failed to save section"}),[3,5];case 4:return v(!1),[7];case 5:return[2]}})}),function(e){return t.apply(this,arguments)});return c?(0,d.jsx)("div",{className:"flex justify-center py-12",children:(0,d.jsx)("div",{className:"w-12 h-12 border-b-2 roun
1ded-full animate-spin border-primary-600"})}):(0,d.jsxs)("form",{onSubmit:Z,className:"space-y-6",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Get In Touch Section"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Configure the CTA / contact section on the homepage."})]}),(0,d.jsxs)(f.Z,{type:"submit",isLoading:b,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),"Save Changes"]})]}),j.text&&(0,d.jsx)("div",{className:(0,W.Z)("p-4 rounded-lg text-sm","success"===j.type?"bg-green-50 text-green-600":"bg-red-50 text-red-600"),children:j.text}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,d.jsx)(m.Z,{label:"Subtitle",name:"subtitle",value:w.subtitle,onChange:k,placeholder:"e.g., Get In Touch"}),(0,d.jsx)(m.Z,{label:"Highlight Text",name:"highlight_text",value:w.highlight_text,onChange:k,placeholder:"e.g., The Media"})]}),(0,d.jsx)(m.Z,{label:"Title (before highlight)",
1name:"title",value:w.title,onChange:k,placeholder:"e.g., Interested in harnessing the influence of"}),(0,d.jsx)(p.Z,{label:"Paragraph",name:"paragraph",value:w.paragraph,onChange:k,placeholder:"Description text...",rows:3}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,d.jsx)(m.Z,{label:"Button Text",name:"button_text",value:w.button_text,onChange:k,placeholder:"e.g., Book A Call Now"}),(0,d.jsx)(m.Z,{label:"Button Link",name:"button_link",value:w.button_link,onChange:k,placeholder:"e.g., /contact"})]}),(0,d.jsxs)("div",{className:"pt-6 border-t",children:[(0,d.jsx)("h3",{className:"mb-4 text-sm font-medium text-gray-700",children:"Preview"}),(0,d.jsxs)("div",{className:"bg-[#1a1a1a] rounded-lg p-8 text-center relative overflow-hidden",children:[(0,d.jsx)("div",{className:"absolute inset-0 pointer-events-none opacity-10",style:{backgroundImage:"radial-gradient(#ffffff 1px, transparent 1px)",backgroundSize:"20px 20px"}}),(0,d.jsxs)("div",{className:"relative z-10",children:[w.subtitle&&(0,d.jsx)("span",{className:"block mb-4 text-xs font-bold tracking-widest text-orange-500 uppercase",children:w.subtitle}),(0,d.jsxs)("h2",{className:"mb-4 text-xl font-bold text-white md:text-2xl",children:[w.title," ",(0,d.jsx)("span",{className:"text-orange-500",children:w.highlight_text})]}),(0,d.jsx)("p",{className:"max-w-xl mx-auto mb-6 text-sm text-gray-400",children:w.paragraph}),w.button_text&&(0,d.jsxs)("button",{className:"inline-flex items-center gap-2 px-6 py-3 text-sm font-bold tracking-wider text-white uppercase transition-colors border-2 border-white rounded hover:bg-white hover:text-black",children:[w.button_text,(0,d.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]})]})]})]})]})}function Q(){var e,t,s=(0,l._)((0,u.useState)({subtitle:"Our Services",title:"Discover Our",highlight_text:"Limitless Service",services:[{icon:"Monitor",title:"Free PRMS",description:"Our Press Release Management Software is like a friendly assistant, making your goals easy with smart PR."},{icon:"Zap",title:"Free PR Consultancy",description:"Get free PR advice, personalized planning, and boost your crypto presence."},{icon:"LifeBuoy",title:"Editorial Support",description:"Improve your blockchain story with our Expert Editorial Support."},{icon:"Globe",title:"Global Distribution",description:"Instant access to a massive network of media outlets worldwide."},{icon:"Search",title:"SEO Optimization",description:"Maximize search visibility with content optimized for keywords."},{icon:"BarChart2",title:"Detailed Reporting",description:"Comprehensive analytics reports to track the performance."}]}),2),h=s[0],x=s[1],b=(0,l._)((0,u.useState)(!0),2),v=b[0],y=b[1],j=(0,l._)((0,u.useState)(!1),2),N=j[0],_=j[1],w=(0,l._)((0,u.useState)(null),2),S=w[0],C=w[1];(0,u.useEffect)(function(){k()},[]);var k=(e=(0,a._)(function(){var e,t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,g.h.getAdminHomeSection("our-services")];case 1:return(e=s.sent()).data&&e.data.section_data&&x({subtitle:(t=e.data.section_data).subtitle||"Our Services",title:t.title||"Discover Our",highlight_text:t.highlight_text||"Limitless Service",services:t.services||[]}),[3,4];case 2:return s.sent(),[3,4];case 3:return y(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),Z=(t=(0,a._)(function(){return(0,o.Jh)(this,function(e){switch(e.label){case 0:_(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,g.h.updateHomeSection({section_key:"our-services",section_data:h,is_active:!0,sort_order:7})];case 2:return e.sent(),C({message:"Our Services section saved successfully!",type:"success"}),[3,5];case 3:return e.sent(),C({message:"Error saving section",type:"error"}),[3,5];case 4:return _(!1),[7];case 5:return[2]}})}),function(){return t.apply(this,arguments)}),P=function(e,t,s){var a=h.services||[],l=(0,c._)(a);l[e]=(0,i._)((0,n._)({},l[e]),(0,r._)({},t,s)),x((0,i._)((0,n._)({},h),{services:l}))},B=function(e){var t=h.services||[];if(t.length<=1){C({message:"At least one service is required",type:"info"});return}var s=t.filter(function(t,s){return s!==e});x((0,i._)((0,n._)({},h),{services:s}))};return v?(0,d.jsx)("div",{className:"p-8 text-center text-gray-500",children:"Loading..."}):(0,d.jsxs)("div",{className:"space-y-6",children:[S&&(0,d.jsx)(J,{message:S.message,type:S.type,onClose:function(){return C(null)}}),(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Our Services Section"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Highlight your services with icons"})]}),(0,d.jsxs)(f.Z,{onClick:Z,disabled:N,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),N?"Saving...":"Save Changes"]})]}),(0,d.jsxs)("div",{className:"p-6 space-y-4 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsx)("h3",{className:"font-medium text-gray-900",children:"Section Header"}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[(0,d.jsx)(m.Z,{label:"Subtitle",value:h.subtitle,onChange:function(e){return x((0,i._)((0,n._)({},h),{subtitle:e.target.value}))},placeholder:"Our Services"}),(0,d.jsx)(m.Z,{label:"Title",value:h.title,onChange:function(e){return x((0,i._)((0,n._)({},h),{title:e.target.value}))},placeholder:"Discover Our"}),(0,d.jsx)(m.Z,{label:"Highlighted Text",value:h.highlight_text,onChange:function(e){return x((0,i._)((0,n._)({},h),{highlight_text:e.target.value}))},placeholder:"Limitless Service"})]})]}),(0,d.jsxs)("div",{className:"p-6 space-y-4 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("h3",{className:"font-medium text-gray-900",children:["Services (",(h.services||[]).length,"/9)"]}),(0,d.jsxs)(f.Z,{variant:"outline",size:"sm",onClick:function(){var e=h.services||[];if(e.length>=9){C({message:"Maximum 9 services allowed",type:"info"});return}x((0,i._)((0,n._)({},h),{services:(0,c._)(e).concat([{icon:"Rocket",title:"New Service",description:"Service description..."}])}))},children:[(0,d.jsx)(R.Z,{className:"w-4 h-4 mr-1"}),"Add Service"]})]}),(0,d.jsx)("div",{className:"space-y-4",children:(h.services||[]).map(function(e,t){return(0,d.jsxs)("div",{className:"p-4 border border-gray-200 rounded-lg bg-gray-50",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,d.jsxs)("span",{className:"px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded",children:["Service ",String(t+1).padStart(2,"0")]}),(0,d.jsx)("button",{onClick:function(){return B(t)},className:"p-1 text-red-500 hover:text-red-700",children:(0,d.jsx)(A.Z,{className:"w-4 h-4"})})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[(0,d.jsx)(U,{label:"Icon",value:e.icon,onChange:function(e){return P(t,"icon",e)}}),(0,d.jsx)(m.Z,{label:"Title",value:e.title,onChange:function(e){return P(t,"title",e.target.value)},placeholder:"Service Title"}),(0,d.jsx)("div",{className:"md:col-span-1",children:(0,d.jsx)(p.Z,{label:"Description",value:e.description,onChange:function(e){return P(t,"description",e.target.value)},placeholder:"Service description...",rows:2})})]})]},t)})})]}),(0,d.jsxs)("div",{className:"p-6 space-y-4 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsx)("h3",{className:"font-medium text-gray-900",children:"Preview"}),(0,d.jsxs)("div",{className:"relative py-12 overflow-hidden rounded-lg bg-gradient-to-b from-white to-purple-50",children:[(0,d.jsxs)("div",{className:"mb-12 text-center",children:[(0,d.jsx)("span",{className:"block text-sm font-bold tracking-[0.2em] text-[#f47821] uppercase mb-3",children:h.subtitle}),(0,d.jsxs)("h2",{className:"text-2xl font-extrabold tracking-tight text-gray-900",children:[h.title," ",(0,d.jsx)("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-[#f47821] to-orange-600",children:h.highlight_text})]})]}),(0,d.jsx)("div",{className:"grid grid-cols-1 gap-4 px-6 md:grid-cols-2 lg:grid-cols-3",children:(h.services||[]).map(function(e,t){var s=H[e.icon];return(0,d.jsxs)("div",{className:"relative p-6 text-left transition-all duration-300 bg-white rounded-2xl hover:bg-[#f47821] group",children:[(0,d.jsx)("div",{className:"mb-4 transition-transform duration-300 transform group-hover:-translate-y-1",children:s?(0,d.jsx)(s,{className:"w-10 h-10 text-[#f47821] group-hover:text-white transition-colors"}):(0,d.jsx)("div",{className:"w-10 h-10 bg-gray-200 rounded"})}),(0,d.jsxs)("div",{className:"relative z-10",children:[(0,d.jsx)("h3",{className:"mb-2 text-lg font-bold text-gray-900 transition-colors group-hover:text-white",children:e.title}),(0,d.jsx)("p",{className:"text-sm leading-relaxed text-gray-500 transition-colors group-hover:text-white/90 line-clamp-3",children:e.description})]}),(0,d.jsx)("div",{className:"absolute text-6xl font-bold leading-none transition-colors duration-300 pointer-events-none select-none bottom-2 right-4 text-orange-100/60 -z-0 group-hover:text-white/20",children:String(t+1).padStart(2,"0")})]},t)})})]})]})]})}function ee(){var e,t,s,c=(0,l._)((0,u.useState)({title_line1:"Rise Your Visibility with Our",title_line2:"Excellence PR Powerful Package.",button_text:"Shop Now",button_link:"/services",left_image:"",right_image:""}),2),h=c[0],x=c[1],p=(0,l._)((0,u.useState)(!0),2),v=p[0],y=p[1],j=(0,l._)((0,u.useState)(!1),2),N=j[0],_=j[1],w=(0,l._)((0,u.useState)(null),2),S=w[0],C=w[1],k=(0,u.useRef)(null),Z=(0,u.useRef)(null);(0,u.useEffect)(function(){P()},[]);var P=(e=(0,a._)(function(){var e,t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,g.h.getAdminHomeSection("cta")];case 1:return(e=s.sent()).data&&e.data.section_data&&x({title_line1:(t=e.data.section_data).title_line1||"Rise Your Visibility with Our",title_line2:t.title_line2||"Excellence PR Powerful Package.",button_text:t.button_text||"Shop Now",button_link:t.button_link||"/services",left_image:t.left_image||"",right_image:t.right_image||""}),[3,4];case 2:return s.sent(),[3,4];case 3:return y(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),B=(t=(0,a._)(function(){return(0,o.Jh)(this,function(e){switch(e.label){case 0:_(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,g.h.updateHomeSection({section_key:"cta",
1section_data:h,is_active:!0,sort_order:8})];case 2:return e.sent(),C({message:"CTA section saved successfully!",type:"success"}),[3,5];case 3:return e.sent(),C({message:"Error saving section",type:"error"}),[3,5];case 4:return _(!1),[7];case 5:return[2]}})}),function(){return t.apply(this,arguments)}),R=(s=(0,a._)(function(e,t){var s,a;return(0,o.Jh)(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,g.h.uploadHomeSectionImage(e,"cta",t)];case 1:return(a=l.sent()).success&&(null===(s=a.data)||void 0===s?void 0:s.url)&&x((0,i._)((0,n._)({},h),(0,r._)({},t,a.data.url))),[3,3];case 2:return l.sent(),C({message:"Error uploading image",type:"error"}),[3,3];case 3:return[2]}})}),function(e,t){return s.apply(this,arguments)});return v?(0,d.jsx)("div",{className:"p-8 text-center text-gray-500",children:"Loading..."}):(0,d.jsxs)("div",{className:"space-y-6",children:[S&&(0,d.jsx)(J,{message:S.message,type:S.type,onClose:function(){return C(null)}}),(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"CTA Section"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"PR Powerful Package banner"})]}),(0,d.jsxs)(f.Z,{onClick:B,disabled:N,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),N?"Saving...":"Save Changes"]})]}),(0,d.jsxs)("div",{className:"p-6 space-y-4 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsx)("h3",{className:"font-medium text-gray-900",children:"Content"}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,d.jsx)(m.Z,{label:"Title Line 1",value:h.title_line1,onChange:function(e){return x((0,i._)((0,n._)({},h),{title_line1:e.target.value}))},placeholder:"Rise Your Visibility with Our"}),(0,d.jsx)(m.Z,{label:"Title Line 2",value:h.title_line2,onChange:function(e){return x((0,i._)((0,n._)({},h),{title_line2:e.target.value}))},placeholder:"Excellence PR Powerful Package."}),(0,d.jsx)(m.Z,{label:"Button Text",value:h.button_text,onChange:function(e){return x((0,i._)((0,n._)({},h),{button_text:e.target.value}))},placeholder:"Shop Now"}),(0,d.jsx)(m.Z,{label:"Button Link",value:h.button_link,onChange:function(e){return x((0,i._)((0,n._)({},h),{button_link:e.target.value}))},placeholder:"/services"})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[(0,d.jsxs)("div",{className:"p-6 space-y-4 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsx)("h3",{className:"font-medium text-gray-900",children:"Left Image (Brand Logos)"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Upload an image with floating brand logos"}),(0,d.jsx)("input",{type:"file",ref:k,className:"hidden",accept:"image/*",onChange:function(e){var t,s=null===(t=e.target.files)||void 0===t?void 0:t[0];s&&R(s,"left_image")}}),h.left_image?(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("img",{src:h.left_image.startsWith("http")?h.left_image:"".concat(g.h.getApiUrl(),"/").concat(h.left_image),alt:"Left",className:"object-contain w-full h-48 rounded-lg bg-gray-50"}),(0,d.jsx)("button",{onClick:function(){return x((0,i._)((0,n._)({},h),{left_image:""}))},className:"absolute p-1 text-white bg-red-500 rounded-full top-2 right-2 hover:bg-red-600",children:(0,d.jsx)(b.Z,{className:"w-4 h-4"})})]}):(0,d.jsxs)("button",{onClick:function(){var e;return null===(e=k.current)||void 0===e?void 0:e.click()},className:"flex flex-col items-center justify-center w-full h-48 transition-colors border-2 border-gray-300 border-dashed rounded-lg hover:border-orange-500 hover:bg-orange-50",children:[(0,d.jsx)(D.Z,{className:"w-8 h-8 mb-2 text-gray-400"}),(0,d.jsx)("span",{className:"text-sm text-gray-500",children:"Click to upload left image"})]})]}),(0,d.jsxs)("div",{className:"p-6 space-y-4 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsx)("h3",{className:"font-medium text-gray-900",children:"Right Image (Rocket/Illustration)"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Upload an illustration image"}),(0,d.jsx)("input",{type:"file",ref:Z,className:"hidden",accept:"image/*",onChange:function(e){var t,s=null===(t=e.target.files)||void 0===t?void 0:t[0];s&&R(s,"right_image")}}),h.right_image?(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("img",{src:h.right_image.startsWith("http")?h.right_image:"".concat(g.h.getApiUrl(),"/").concat(h.right_image),alt:"Right",className:"object-contain w-full h-48 rounded-lg bg-gray-50"}),(0,d.jsx)("button",{onClick:function(){return x((0,i._)((0,n._)({},h),{right_image:""}))},className:"absolute p-1 text-white bg-red-500 rounded-full top-2 right-2 hover:bg-red-600",children:(0,d.jsx)(b.Z,{className:"w-4 h-4"})})]}):(0,d.jsxs)("button",{onClick:function(){var e;return null===(e=Z.current)||void 0===e?void 0:e.click()},className:"flex flex-col items-center justify-center w-full h-48 transition-colors border-2 border-gray-300 border-dashed rounded-lg hover:border-orange-500 hover:bg-orange-50",children:[(0,d.jsx)(D.Z,{className:"w-8 h-8 mb-2 text-gray-400"}),(0,d.jsx)("span",{className:"text-sm text-gray-500",children:"Click to upload right image"})]})]})]}),(0,d.jsxs)("div",{className:"p-6 space-y-4 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsx)("h3",{className:"font-medium text-gray-900",children:"Preview"}),(0,d.jsxs)("div",{className:"overflow-hidden rounded-xl",style:{background:"linear-gradient(135deg, #c855e0 0%, #b347d1 20%, #9b3ec5 40%, #7c2db5 70%, #6a24aa 100%)"},children:[(0,d.jsx)("div",{className:"absolute top-6 right-[35%] text-yellow-300 text-lg animate-pulse",children:"✦"}),(0,d.jsx)("div",{className:"absolute top-12 right-[30%] text-yellow-300 text-sm animate-pulse",children:"✦"}),(0,d.jsxs)("div",{className:"relative z-10 flex flex-col items-center gap-6 px-6 py-10 lg:flex-row",children:[(0,d.jsx)("div",{className:"relative flex-shrink-0 w-1/4 min-h-[160px] hidden lg:flex items-center justify-center",children:h.left_image?(0,d.jsx)("img",{src:h.left_image.startsWith("http")?h.left_image:"".concat(g.h.getApiUrl(),"/").concat(h.left_image),alt:"Left",className:"object-contain w-full h-32"}):(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)("div",{className:"flex items-center justify-center w-10 h-10 text-orange-500 bg-white rounded-full",children:"$"}),(0,d.jsx)("div",{className:"flex items-center justify-center w-8 h-8 text-xs font-bold text-white bg-green-500 rounded-full",children:"✓"}),(0,d.jsx)("div",{className:"flex items-center justify-center h-6 px-2 text-xs font-bold text-white bg-gray-800 rounded-full",children:"DIGITAL JOURNAL"}),(0,d.jsx)("div",{className:"flex items-center justify-center w-10 h-10 text-xs font-bold text-white bg-orange-500 rounded-full",children:"U.TODAY"})]})}),(0,d.jsxs)("div",{className:"flex-1 text-center lg:text-left",children:[(0,d.jsxs)("h2",{className:"mb-6 text-2xl font-extrabold leading-tight text-white drop-shadow-lg",children:[h.title_line1,(0,d.jsx)("br",{}),h.title_line2]}),(0,d.jsx)("span",{className:"inline-flex items-center gap-2 px-6 py-3 text-sm font-bold tracking-wider text-gray-900 bg-white rounded-lg shadow-xl",children:h.button_text})]}),(0,d.jsx)("div",{className:"items-center justify-center flex-shrink-0 hidden w-1/4 lg:flex",children:h.right_image?(0,d.jsx)("img",{src:h.right_image.startsWith("http")?h.right_image:"".concat(g.h.getApiUrl(),"/").concat(h.right_image),alt:"Right",className:"object-contain h-32"}):(0,d.jsx)("div",{className:"text-6xl",children:"\uD83D\uDE80"})})]})]})]})]})}function et(){var e,t,s,h=(0,l._)((0,u.useState)({subtitle:"REVIEWS",title:"What Clients",highlight_text:"Are Saying",reviews:[{name:"Emma R.",title:"HEAD OF COMMUNICATIONS AT NFT NEXUS",rating:5,quote:"Web3 Newswire made our press release distribution seamless and impactful. Their expertise in the Web3 industry is unmatched.",avatar:""}]}),2),x=h[0],v=h[1],y=(0,l._)((0,u.useState)(!0),2),j=y[0],N=y[1],_=(0,l._)((0,u.useState)(!1),2),w=_[0],S=_[1],C=(0,l._)((0,u.useState)(0),2),k=C[0],Z=C[1],P=(0,l._)((0,u.useState)(null),2),B=P[0],D=P[1];(0,u.useEffect)(function(){F()},[]);var F=(e=(0,a._)(function(){var e,t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,g.h.getAdminHomeSection("reviews")];case 1:return(e=s.sent()).data&&e.data.section_data&&v({subtitle:(t=e.data.section_data).subtitle||"REVIEWS",title:t.title||"What Clients",highlight_text:t.highlight_text||"Are Saying",reviews:t.reviews||[]}),[3,4];case 2:return s.sent(),[3,4];case 3:return N(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),H=(t=(0,a._)(function(){return(0,o.Jh)(this,function(e){switch(e.label){case 0:S(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,g.h.updateHomeSection({section_key:"reviews",section_data:x,is_active:!0,sort_order:9})];case 2:return e.sent(),D({message:"Reviews section saved successfully!",type:"success"}),[3,5];case 3:return e.sent(),D({message:"Error saving section",type:"error"}),[3,5];case 4:return S(!1),[7];case 5:return[2]}})}),function(){return t.apply(this,arguments)}),I=function(e,t,s){var a=x.reviews||[],l=(0,c._)(a);l[e]=(0,i._)((0,n._)({},l[e]),(0,r._)({},t,s)),v((0,i._)((0,n._)({},x),{reviews:l}))},M=function(e){var t=x.reviews||[];if(t.length<=1){D({message:"At least one review is required",type:"info"});return}var s=t.filter(function(t,s){return s!==e});v((0,i._)((0,n._)({},x),{reviews:s})),Z(null)},O=(s=(0,a._)(function(e,t){var s;return(0,o.Jh)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,g.h.uploadHomeSectionImage(e,"reviews","avatar_".concat(t))];case 1:return(s=a.sent()).success&&s.url&&I(t,"avatar",s.url),[3,3];case 2:return a.sent(),D({message:"Error uploading avatar",type:"error"}),[3,3];case 3:return[2]}})}),function(e,t){return s.apply(this,arguments)});if(j)return(0,d.jsx)("div",{className:"p-8 text-center text-gray-500",children:"Loading..."});var U=x.reviews||[];return(0,d.jsxs)("div",{className:"space-y-6",children:[B&&(0,d.jsx)(J,{message:B.message,type:B.type,onClose:function(){return D(null)}}),(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Reviews Section"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Customer testimonials slider"})]}),(0,d.jsxs)(f.Z,{onClick:H,disabled:w,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),w?"Saving...":"Save Changes"]})]}),(0,d.jsxs)("div",{className:"p-6 space-y-4 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsx)("h3",{className:"font-medium text-gray-900",children:"Section Header"}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[(0,d.jsx)(m.Z,{label:"Subtitle",value:x.subtitle,onChange:function(e){return v((0,i._)((0,n._)({},x),{subtitle:e.target.value}))},placeholder:"REVIEWS"}),(0,d.jsx)(m.Z,{label:"Title",value:x.title,onChange:function(e){return v((0,i._)((0,n._)({},x),{title:e.target.value}))},placeholder:"What Clients"}),(0,d.jsx)(m.Z,{label:"Highlighted Text",value:x.highlight_text,onChange:function(e){return v((0,i._)((0,n._)({},x),{highlight_text:e.target.value}))},placeholder:"Are Saying"})]})]}),(0,d.jsxs)("div",{className:"p-6 space-y-4 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("h3",{className:"font-medium text-gray-900",children:["Reviews (",U.length,"/10)"]}),(0,d.jsxs)(f.Z,{variant:"outline",size:"sm",onClick:function(){var e=x.reviews||[];if(e.length>=10){D({message:"Maximum 10 reviews allowed",type:"info"});return}
1var t=(0,c._)(e).concat([{name:"New Reviewer",title:"POSITION AT COMPANY",rating:5,quote:"Your testimonial here...",avatar:""}]);v((0,i._)((0,n._)({},x),{reviews:t})),Z(t.length-1)},children:[(0,d.jsx)(R.Z,{className:"w-4 h-4 mr-1"}),"Add Review"]})]}),(0,d.jsx)("div",{className:"space-y-3",children:U.map(function(e,t){return(0,d.jsxs)("div",{className:"border border-gray-200 rounded-lg",children:[(0,d.jsxs)("button",{onClick:function(){return Z(k===t?null:t)},className:"flex items-center justify-between w-full p-4 text-left hover:bg-gray-50",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"flex items-center justify-center w-10 h-10 overflow-hidden bg-gray-100 rounded-full",children:e.avatar?(0,d.jsx)("img",{src:e.avatar.startsWith("http")?e.avatar:"".concat(g.h.getApiUrl(),"/").concat(e.avatar),alt:e.name,className:"object-cover w-full h-full"}):(0,d.jsx)("span",{className:"text-lg",children:"\uD83D\uDC64"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"font-medium text-gray-900",children:e.name}),(0,d.jsx)("div",{className:"flex gap-0.5",children:(0,c._)([,,,,,]).map(function(t,s){return(0,d.jsx)("span",{className:s<e.rating?"text-orange-500":"text-gray-300",children:"★"},s)})})]})]}),k===t?(0,d.jsx)(E.Z,{className:"w-5 h-5 text-gray-400"}):(0,d.jsx)(L.Z,{className:"w-5 h-5 text-gray-400"})]}),k===t&&(0,d.jsxs)("div",{className:"p-4 space-y-4 border-t border-gray-200 bg-gray-50",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,d.jsx)(m.Z,{label:"Reviewer Name",value:e.name,onChange:function(e){return I(t,"name",e.target.value)},placeholder:"Emma R."}),(0,d.jsx)(m.Z,{label:"Title/Position",value:e.title,onChange:function(e){return I(t,"title",e.target.value)},placeholder:"HEAD OF COMMUNICATIONS AT NFT NEXUS"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"Rating"}),(0,d.jsx)("div",{className:"flex gap-2",children:[1,2,3,4,5].map(function(s){return(0,d.jsx)("button",{onClick:function(){return I(t,"rating",s)},className:"text-2xl transition-colors ".concat(s<=e.rating?"text-orange-500":"text-gray-300 hover:text-orange-300"),children:"★"},s)})})]}),(0,d.jsx)(p.Z,{label:"Quote/Testimonial",value:e.quote,onChange:function(e){return I(t,"quote",e.target.value)},placeholder:"What the customer said...",rows:3}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"Avatar Image"}),(0,d.jsxs)("div",{className:"flex items-center gap-4",children:[(0,d.jsx)("div",{className:"flex items-center justify-center w-16 h-16 overflow-hidden bg-gray-100 rounded-full",children:e.avatar?(0,d.jsx)("img",{src:e.avatar.startsWith("http")?e.avatar:"".concat(g.h.getApiUrl(),"/").concat(e.avatar),alt:e.name,className:"object-cover w-full h-full"}):(0,d.jsx)("span",{className:"text-2xl",children:"\uD83D\uDC64"})}),(0,d.jsx)("input",{type:"file",accept:"image/*",onChange:function(e){var s,a=null===(s=e.target.files)||void 0===s?void 0:s[0];a&&O(a,t)},className:"text-sm"}),e.avatar&&(0,d.jsx)("button",{onClick:function(){return I(t,"avatar","")},className:"p-1 text-red-500 hover:text-red-700",children:(0,d.jsx)(b.Z,{className:"w-4 h-4"})})]})]}),(0,d.jsx)("div",{className:"flex justify-end pt-2",children:(0,d.jsxs)("button",{onClick:function(){return M(t)},className:"flex items-center gap-1 px-3 py-1 text-sm text-red-600 hover:text-red-800",children:[(0,d.jsx)(A.Z,{className:"w-4 h-4"}),"Remove Review"]})})]})]},t)})})]}),(0,d.jsxs)("div",{className:"p-6 space-y-4 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsx)("h3",{className:"font-medium text-gray-900",children:"Preview"}),(0,d.jsxs)("div",{className:"py-12 bg-white rounded-lg",children:[(0,d.jsxs)("div",{className:"mb-10 text-center",children:[(0,d.jsx)("span",{className:"block text-sm font-bold tracking-[0.2em] text-[#f47821] uppercase mb-3",children:x.subtitle}),(0,d.jsxs)("h2",{className:"text-2xl font-extrabold tracking-tight text-gray-900",children:[x.title," ",(0,d.jsx)("span",{className:"text-[#f47821]",children:x.highlight_text})]})]}),U.length>0&&(0,d.jsxs)("div",{className:"flex flex-col items-center px-4 text-center",children:[(0,d.jsxs)("div",{className:"flex items-center justify-center gap-4 mb-6",children:[(0,d.jsx)("div",{className:"w-10 h-10 overflow-hidden bg-gray-200 rounded-full opacity-40",children:(0,d.jsx)("div",{className:"flex items-center justify-center w-full h-full text-gray-500",children:"\uD83D\uDC64"})}),(0,d.jsx)("div",{className:"z-10 w-16 h-16 overflow-hidden rounded-full shadow-xl ring-4 ring-orange-100",children:U[0].avatar?(0,d.jsx)("img",{src:U[0].avatar.startsWith("http")?U[0].avatar:"".concat(g.h.getApiUrl(),"/").concat(U[0].avatar),alt:U[0].name,className:"object-cover w-full h-full"}):(0,d.jsx)("div",{className:"flex items-center justify-center w-full h-full text-2xl bg-gray-200",children:"\uD83D\uDC64"})}),(0,d.jsx)("div",{className:"w-10 h-10 overflow-hidden bg-gray-200 rounded-full opacity-40",children:(0,d.jsx)("div",{className:"flex items-center justify-center w-full h-full text-gray-500",children:"\uD83D\uDC64"})})]}),(0,d.jsxs)("h4",{className:"mb-2 text-xs font-bold tracking-widest text-gray-900 uppercase",children:[U[0].name," - ",(0,d.jsx)("span",{className:"text-[#f47821]",children:U[0].title})]}),(0,d.jsx)("div",{className:"flex gap-1 text-[#f47821] mb-4 justify-center",children:(0,c._)([,,,,,]).map(function(e,t){return(0,d.jsx)("span",{className:t<U[0].rating?"text-[#f47821]":"text-gray-300",children:"★"},t)})}),(0,d.jsxs)("p",{className:"max-w-2xl mx-auto text-base font-medium leading-relaxed text-gray-600",children:['"',U[0].quote,'"']}),(0,d.jsx)("div",{className:"flex justify-center gap-2 mt-6",children:U.map(function(e,t){return(0,d.jsx)("div",{className:"w-2 h-2 rounded-full ".concat(0===t?"border-2 border-gray-800":"bg-gray-300")},t)}
1)})]})]})]})]})}function es(){var e,t,s,h=(0,l._)((0,u.useState)({title:"",brands:[]}),2),x=h[0],p=h[1],v=(0,l._)((0,u.useState)(!0),2),y=v[0],j=v[1],N=(0,l._)((0,u.useState)(!1),2),_=N[0],w=N[1],S=(0,l._)((0,u.useState)(null),2),C=S[0],k=S[1],Z=(0,u.useRef)({}),P=(0,l._)((0,u.useState)({}),2),B=P[0],F=P[1],H=(0,l._)((0,u.useState)(null),2),I=H[0],M=H[1];(0,u.useEffect)(function(){O()},[]);var O=(e=(0,a._)(function(){var e;return(0,o.Jh)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,3,4]),[4,g.h.getAdminHomeSection("brands")];case 1:return(e=t.sent()).data&&p(e.data.section_data||{title:"",brands:[]}),[3,4];case 2:return t.sent(),[3,4];case 3:return j(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),U=(t=(0,a._)(function(){return(0,o.Jh)(this,function(e){switch(e.label){case 0:w(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,g.h.updateHomeSection({section_key:"brands",section_data:x,is_active:!0,sort_order:10})];case 2:return e.sent(),M({message:"Brands section saved successfully!",type:"success"}),[3,5];case 3:return e.sent(),M({message:"Failed to save brands section",type:"error"}),[3,5];case 4:return w(!1),[7];case 5:return[2]}})}),function(){return t.apply(this,arguments)}),W=function(e){var t=(0,c._)(x.brands||[]);t.splice(e,1),p((0,i._)((0,n._)({},x),{brands:t})),C===e&&k(null)},G=function(e,t,s){var a=(0,c._)(x.brands||[]);a[e]=(0,i._)((0,n._)({},a[e]),(0,r._)({},t,s)),p((0,i._)((0,n._)({},x),{brands:a}))},z=(s=(0,a._)(function(e,t){var s,a;return(0,o.Jh)(this,function(l){switch(l.label){case 0:F(function(t){return(0,i._)((0,n._)({},t),(0,r._)({},e,!0))}),l.label=1;case 1:return l.trys.push([1,3,4,5]),[4,g.h.uploadHomeSectionImage(t,"brands","brand_logo_".concat(e))];case 2:return(null===(s=(a=l.sent()).data)||void 0===s?void 0:s.url)&&G(e,"logo",a.data.url),[3,5];case 3:return l.sent(),M({message:"Failed to upload logo",type:"error"}),[3,5];case 4:return F(function(t){return(0,i._)((0,n._)({},t),(0,r._)({},e,!1))}),[7];case 5:return[2]}})}),function(e,t){return s.apply(this,arguments)}),Y=function(e){G(e,"logo","")};return y?(0,d.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,d.jsx)("div",{className:"w-8 h-8 border-4 border-teal-500 rounded-full border-t-transparent animate-spin"})}):(0,d.jsxs)("div",{className:"space-y-6",children:[I&&(0,d.jsx)(J,{message:I.message,type:I.type,onClose:function(){return M(null)}}),(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Brands Section"}),(0,d.jsxs)(f.Z,{onClick:U,disabled:_,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),_?"Saving...":"Save Changes"]})]}),(0,d.jsx)("p",{className:"text-gray-500",children:"Showcase partner brands and logos in a horizontal strip."}),(0,d.jsxs)("div",{className:"p-6 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsx)("h3",{className:"mb-4 font-medium text-gray-900",children:"Section Settings"}),(0,d.jsx)(m.Z,{label:"Section Title (Optional)",value:x.title||"",onChange:function(e){return p((0,i._)((0,n._)({},x),{title:e.target.value}))},placeholder:"e.g., Trusted by Top Brands"})]}),(0,d.jsxs)("div",{className:"p-6 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsxs)("h3",{className:"font-medium text-gray-900",children:["Brand Logos (",(x.brands||[]).length,"/12)"]}),(0,d.jsxs)("button",{onClick:function(){if((x.brands||[]).length>=12){M({message:"Maximum 12 brands allowed",type:"info"});return}p((0,i._)((0,n._)({},x),{brands:(0,c._)(x.brands||[]).concat([{name:"",logo:"",link:""}])})),k((x.brands||[]).length)},disabled:(x.brands||[]).length>=12,className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-teal-600 bg-teal-50 rounded-lg hover:bg-teal-100 disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)(R.Z,{className:"w-4 h-4"}),"Add Brand"]})]}),0===(x.brands||[]).length?(0,d.jsx)("p",{className:"py-8 text-center text-gray-400",children:'No brands added yet. Click "Add Brand" to start.'}):(0,d.jsx)("div",{className:"space-y-3",children:(x.brands||[]).map(function(e,t){return(0,d.jsxs)("div",{className:"overflow-hidden border border-gray-200 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between p-4 cursor-pointer bg-gray-50 hover:bg-gray-100",onClick:function(){return k(C===t?null:t)},children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[e.logo?(0,d.jsx)("img",{src:e.logo,alt:e.name,className:"object-contain w-10 h-10 bg-white border rounded"}):(0,d.jsx)("div",{className:"flex items-center justify-center w-10 h-10 text-xs text-gray-400 bg-gray-200 rounded",children:"Logo"}),(0,d.jsx)("span",{className:"font-medium text-gray-900",children:e.name||"Brand ".concat(t+1)})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("button",{onClick:function(e){e.stopPropagation(),W(t)},className:"p-1.5 text-red-500 hover:bg-red-50 rounded",children:(0,d.jsx)(A.Z,{className:"w-4 h-4"})}),C===t?(0,d.jsx)(E.Z,{className:"w-5 h-5 text-gray-400"}):(0,d.jsx)(L.Z,{className:"w-5 h-5 text-gray-400"})]})]}),C===t&&(0,d.jsxs)("div",{className:"p-4 space-y-4 border-t border-gray-200",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"Brand Logo"}),(0,d.jsxs)("div",{className:"flex items-start gap-4",children:[e.logo?(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("img",{src:e.logo,alt:"Logo",className:"object-contain w-24 h-16 bg-gray-100 border rounded"}),(0,d.jsx)("button",{onClick:function(){return Y(t)},className:"absolute p-1 text-white bg-red-500 rounded-full -top-2 -right-2 hover:bg-red-600",children:(0,d.jsx)(b.Z,{className:"w-3 h-3"})})]}):(0,d.jsx)("div",{className:"flex items-center justify-center w-24 h-16 text-xs text-gray-400 bg-gray-100 border border-gray-300 border-dashed rounded",children:"No logo"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("input",{type:"file",accept:"image/*",ref:function(e){Z.current[t]=e},onChange:function(e){var s,a=null===(s=e.target.files)||void 0===s?void 0:s[0];a&&z(t,a)},className:"hidden"}),(0,d.jsxs)("button",{onClick:function(){var e;return null===(e=Z.current[t])||void 0===e?void 0:e.click()},disabled:B[t],className:"flex items-center gap-2 px-3 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 disabled:opacity-50",children:[(0,d.jsx)(D.Z,{className:"w-4 h-4"}),B[t]?"Uploading...":"Upload Logo"]}),(0,d.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"PNG or SVG with transparent background recommended"})]})]})]}),(0,d.jsx)(m.Z,{label:"Brand Name",value:e.name||"",onChange:function(e){return G(t,"name",e.target.value)},placeholder:"e.g., Benzinga"}),(0,d.jsx)(m.Z,{label:"Website Link (Optional)",value:e.link||"",onChange:function(e){return G(t,"link",e.target.value)},placeholder:"e.g., https://benzinga.com"})]})]},t)})})]}),(0,d.jsxs)("div",{className:"p-6 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsx)("h3",{className:"mb-4 font-medium text-gray-900",children:"Preview"}),(0,d.jsxs)("div",{className:"py-8 bg-white border border-gray-100 rounded-lg",children:[x.title&&(0,d.jsx)("p",{className:"mb-6 text-sm font-medium text-center text-gray-500",children:x.title}),(0,d.jsx)("div",{className:"flex flex-wrap items-center justify-center gap-8 px-4 transition-all opacity-70 grayscale hover:grayscale-0",children:0===(x.brands||[]).length?(0,d.jsx)("p",{className:"text-sm text-gray-400",children:"Add brands to see preview"}):(x.brands||[]).map(function(e,t){return(0,d.jsx)("div",{className:"flex items-center",children:e.logo?(0,d.jsx)("img",{src:e.logo,alt:e.name,className:"object-contain h-8"}):(0,d.jsx)("span",{className:"text-lg font-bold text-gray-800",children:e.name||"Brand"})},t)})})]})]})]})}function ea(){var e,t,s,r=(0,l._)((0,u.useState)({popup_enabled:"1",popup_t
1itle:"",popup_subtitle:"",popup_button_text:"",popup_image:"",popup_delay:"3000",popup_show_once:"1",footer_card_enabled:"1",footer_card_text:"",footer_card_icon:"megaphone",footer_card_link:"#"}),2),c=r[0],h=r[1],x=(0,l._)((0,u.useState)(!0),2),v=x[0],y=x[1],j=(0,l._)((0,u.useState)(!1),2),N=j[0],_=j[1],w=(0,l._)((0,u.useState)(null),2),S=w[0],C=w[1],k=(0,l._)((0,u.useState)(!1),2),Z=k[0],P=k[1],B=(0,u.useRef)(null);(0,u.useEffect)(function(){D()},[]);var D=(e=(0,a._)(function(){var e,t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,g.h.getSettingsByGroups("popup,footer_card")];case 1:return(e=s.sent()).data&&(t={},e.data.forEach(function(e){t[e.setting_key]=e.setting_value}),h(function(e){return(0,n._)({},e,t)})),[3,4];case 2:return s.sent(),[3,4];case 3:return y(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),R=(t=(0,a._)(function(){var e;return(0,o.Jh)(this,function(t){switch(t.label){case 0:_(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),e=Object.entries(c).map(function(e){var t=(0,l._)(e,2),s=t[0];return{setting_key:s,setting_value:t[1],setting_group:s.startsWith("footer_card")?"footer_card":"popup"}}),[4,g.h.bulkUpdateSettings(e)];case 2:return t.sent(),C({type:"success",message:"Settings saved successfully!",onClose:function(){return C(null)}}),[3,5];case 3:return t.sent(),C({type:"error",message:"Failed to save settings",onClose:function(){return C(null)}}),[3,5];case 4:return _(!1),[7];case 5:return[2]}})}),function(){return t.apply(this,arguments)}),A=(s=(0,a._)(function(e){var t,s;return(0,o.Jh)(this,function(a){switch(a.label){case 0:P(!0),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,g.h.uploadHomeSectionImage(e,"popup","popup_image")];case 2:return(s=a.sent()).success&&(null===(t=s.data)||void 0===t?void 0:t.url)&&h(function(e){return(0,i._)((0,n._)({},e),{popup_image:s.data.url})}),[3,5];case 3:return a.sent(),C({type:"error",message:"Failed to upload image",onClose:function(){return C(null)}}),[3,5];case 4:return P(!1),[7];case 5:return[2]}})}),function(e){return s.apply(this,arguments)});return v?(0,d.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Loading..."}):(0,d.jsxs)("div",{className:"space-y-6",children:[S&&(0,d.jsx)(J,(0,n._)({},S)),(0,d.jsxs)("div",{className:"p-6 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-gray-900",children:"Popup Modal Settings"}),(0,d.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:"1"===c.popup_enabled,onChange:function(e){return h(function(t){return(0,i._)((0,n._)({},t),{popup_enabled:e.target.checked?"1":"0"})})},className:"w-4 h-4 border-gray-300 rounded text-primary-600 focus:ring-primary-500"}),(0,d.jsx)("span",{className:"text-sm text-gray-700",children:"Enabled"})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)(m.Z,{label:"Popup Title",value:c.popup_title,onChange:function(e){return h(function(t){return(0,i._)((0,n._)({},t),{popup_title:e.target.value})})},placeholder:"Go live on trusted Web3 media today!"}),(0,d.jsx)(p.Z,{label:"Popup Subtitle",value:c.popup_subtitle,onChange:function(e){return h(function(t){return(0,i._)((0,n._)({},t),{popup_subtitle:e.target.value})})},placeholder:"Publish your Crypto Press Release same-day...",rows:3}),(0,d.jsx)(m.Z,{label:"Button Text",value:c.popup_button_text,onChange:function(e){return h(function(t){return(0,i._)((0,n._)({},t),{popup_button_text:e.target.value})})},placeholder:"Grab Your Deal Now"}),(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,d.jsx)(m.Z,{label:"Delay (ms)",type:"number",value:c.popup_delay,onChange:function(e){return h(function(t){return(0,i._)((0,n._)({},t),{popup_delay:e.target.value})})},placeholder:"3000"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"Show Once"}),(0,d.jsxs)("select",{value:c.popup_show_once,onChange:function(e){return h(function(t){return(0,i._)((0,n._)({},t),{popup_show_once:e.target.value})})},className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg",children:[(0,d.jsx)("option",{value:"1",children:"Yes (per session)"}),(0,d.jsx)("option",{value:"0",children:"No (always)"})]})]})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"Popup Image (Left Side)"}),(0,d.jsx)("div",{className:"p-4 border-2 border-gray-200 border-dashed rounded-lg",children:c.popup_image?(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("img",{src:c.popup_image,alt:"Popup",className:"object-cover w-full h-48 rounded-lg"}),(0,d.jsx)("button",{onClick:function(){return h(function(e){return(0,i._)((0,n._)({},e),{popup_image:""})})},className:"absolute p-1 text-white bg-red-500 rounded-full top-2 right-2",children:(0,d.jsx)(b.Z,{className:"w-4 h-4"})})]}):(0,d.jsxs)("div",{className:"py-8 text-center",children:[(0,d.jsx)(F.Z,{className:"w-12 h-12 mx-auto mb-3 text-gray-300"}),(0,d.jsx)("p",{className:"mb-3 text-sm text-gray-500",children:"Upload popup image"}),(0,d.jsx)("input",{ref:B,type:"file",accept:"image/*",onChange:function(e){var t,s=null===(t=e.target.files)||void 0===t?void 0:t[0];s&&A(s)},className:"hidden"}),(0,d.jsx)("button",{onClick:function(){var e;return null===(e=B.current)||void 0===e?void 0:e.click()},disabled:Z,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 disabled:opacity-50",children:Z?"Uploading...":"Choose Image"})]})})]})]})]}),(0,d.jsxs)("div",{className:"p-6 bg-white border border-gray-200 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-gray-900",children:"Fixed Footer Card Settings"}),(0,d.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:"1"===c.footer_card_enabled,onChange:function(e){return h(function(t){return(0,i._)((0,n._)({},t),{footer_card_enabled:e.target.checked?"1":"0"})})},className:"w-4 h-4 border-gray-300 rounded text-primary-600 focus:ring-primary-500"}),(0,d.jsx)("span",{className:"text-sm text-gray-700",children:"Enabled"})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[(0,d.jsx)(m.Z,{label:"Card Text",value:c.footer_card_text,onChange:function(e){return h(function(t){return(0,i._)((0,n._)({},t),{footer_card_text:e.target.value})})},placeholder:"Get Free OpenPR Press Release"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"Icon"}),(0,d.jsxs)("select",{value:c.footer_card_icon,onChange:function(e){return h(function(t){return(0,i._)((0,n._)({},t),{footer_card_icon:e.target.value})})},className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg",children:[(0,d.jsx)("option",{value:"megaphone",children:"Megaphone"}),(0,d.jsx)("option",{value:"gift",children:"Gift"}),(0,d.jsx)("option",{value:"star",children:"Star"}),(0,d.jsx)("option",{value:"bell",children:"Bell"}),(0,d.jsx)("option",{value:"mail",children:"Mail"})]})]}),(0,d.jsx)(m.Z,{label:"Link URL",value:c.footer_card_link,onChange:function(e){return h(function(t){return(0,i._)((0,n._)({},t),{footer_card_link:e.target.value})})},placeholder:"#"})]}),(0,d.jsxs)("div",{className:"pt-6 mt-6 border-t border-gray-200",children:[(0,d.jsx)("label",{className:"block mb-3 text-sm font-medium text-gray-700",children:"Preview"}),(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsxs)("div",{className:"inline-flex items-center gap-3 px-5 py-3 bg-white border border-gray-200 rounded-full shadow-lg",children:[(0,d.jsx)("span",{className:"text-sm font-medium text-gray-800",children:c.footer_card_text||"Card Text"}),(0,d.jsx)("span",{className:"text-xl",children:"\uD83D\uDCE2"}),(0,d.jsx)("button",{className:"p-1 text-gray-400 hover:text-gray-600",children:(0,d.jsx)(b.Z,{className:"w-4 h-4"})})]})})]})]}),(0,d.jsx)("div",{className:"flex justify-end",children:(0,d.jsxs)(f.Z,{onClick:R,disabled:N,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),N?"Saving...":"Save Settings"]})})]})}function er(){var e,t,s=(0,l._)((0,u.useState)(!0),2),c=s[0],h=s[1],x=(0,l._)((0,u.useState)(!1),2),p=x[0],b=x[1],v=(0,l._)((0,u.useState)({type:"",text:""}),2),y=v[0],j=v[1],N=(0,l._)((0,u.useState)({subtitle:"RECENT UPDATION",title:"Related Blogs",highlight_text:"For Digital Platforms",blog_json_url:""}),2),_=N[0],w=N[1];(0,u.useEffect)(function(){S()},[]);var S=(e=(0,a._)(function(){var e,t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,g.h.getAdminHomeSection("blog")];case 1:return(t=s.sent()).success&&(null===(e=t.data)||void 0===e?void 0:e.section_data)&&w(function(e){return(0,n._)({},e,t.data.section_data)}),[3,4];case 2:return s.sent(),[3,4];case 3:return h(!1),[7];case 4:return[2]}})}),function(){return e.apply(this,arguments)}),C=function(e){var t=e.target,s=t.name,a=t.value;w(function(e){return(0,i._)((0,n._)({},e),(0,r._)({},s,a))})},k=(t=(0,a._)(function(e){var t;return(0,o.Jh)(this,function(s){switch(s.label){case 0:e.preventDefault(),b(!0),j({type:"",text:""}),s.label=1;case 1:return s.trys.push([1,3,4,5]),[4,g.h.updateHomeSection({section_key:"blog",section_data:_,is_active:!0,sort_order:10})];case 2:return(t=s.sent()).success?j({type:"success",text:"Blog section saved successfully!"}):j({type:"error",text:t.message||"Failed to save section"}),[3,5];case 3:return j({type:"error",text:s.sent().message||"Failed to save section"}),[3,5];case 4:return b(!1),[7];case 5:return[2]}})}),function(e){return t.apply(this,arguments)});return c?(0,d.jsx)("div",{className:"flex justify-center py-12",children:(0,d.jsx)("div",{className:"w-12 h-12 border-b-2 roun
1ded-full animate-spin border-primary-600"})}):(0,d.jsxs)("form",{onSubmit:k,className:"space-y-6",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Blog Section"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Configure the Related Blogs section title on the homepage."})]}),(0,d.jsxs)(f.Z,{type:"submit",isLoading:p,children:[(0,d.jsx)(T.Z,{className:"w-4 h-4 mr-2"}),"Save Changes"]})]}),y.text&&(0,d.jsx)("div",{className:(0,W.Z)("p-4 rounded-lg text-sm","success"===y.type?"bg-green-50 text-green-600":"bg-red-50 text-red-600"),children:y.text}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)(m.Z,{label:"Subtitle (Uppercase Label)",name:"subtitle",value:_.subtitle,onChange:C,placeholder:"e.g., RECENT UPDATION"}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,d.jsx)(m.Z,{label:"Title",name:"title",value:_.title,onChange:C,placeholder:"e.g., Related Blogs"}),(0,d.jsx)(m.Z,{label:"Highlight Text (Orange)",name:"highlight_text",value:_.highlight_text,onChange:C,placeholder:"e.g., For Digital Platforms"})]}),(0,d.jsxs)("div",{className:"p-4 border border-blue-200 rounded-lg bg-blue-50",children:[(0,d.jsx)(m.Z,{label:"WordPress Blog JSON URL",name:"blog_json_url",value:_.blog_json_url,onChange:C,placeholder:"e.g., https://bhmarketer.ai/blog/wp-json/wp/v2/posts"}),(0,d.jsx)("p",{className:"mt-2 text-xs text-blue-600",children:"Enter your WordPress REST API URL to fetch blog posts dynamically. Leave empty to show static content."})]})]}),(0,d.jsxs)("div",{className:"pt-6 mt-6 border-t border-gray-200",children:[(0,d.jsx)("label",{className:"block mb-3 text-sm font-medium text-gray-700",children:"Preview"}),(0,d.jsxs)("div",{className:"p-8 text-center rounded-lg bg-gray-50",children:[(0,d.jsx)("span",{className:"block text-sm font-bold tracking-[0.2em] text-[#f47821] uppercase mb-3",children:_.subtitle}),(0,d.jsxs)("h2",{className:"text-2xl font-extrabold tracking-tight text-gray-900",children:[_.title," ",(0,d.jsx)("span",{className:"text-[#f47821]",children:_.highlight_text})]})]})]})]})}}},function(e){e.O(0,[8075,1664,8173,3949,7045,9774,2888,179],function(){return e(e.s=28890)}),_N_E=e.O()}]);

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.