import{j as s}from"./vendor-query-DoyCFZ4O.js";import{c as z,r as m,L as f}from"./vendor-react-Rhy2aEWQ.js";import{u as A,b as B,e as g,d as O}from"./index-CwDwxmPI.js";import{c as $,h as E}from"./pricing-DSfs6YQt.js";import{O as F}from"./OptimizedImage-Ch7iZucm.js";import{j as J,e as j,s as M,aA as V}from"./vendor-utils-BOMyae96.js";function y(t){if(!t)return[];try{const a=JSON.parse(t);return Array.isArray(a)?a.filter(r=>typeof r=="string"):[]}catch{return[]}}const i={"web-business":"/images/packages-real/business-website.webp","web-starter":"/images/packages-real/starter-website.webp","web-custom-app":"/images/packages-real/custom-web-application.webp","web-ecommerce-launch-kit":"/images/packages-real/ecommerce-launch-kit.webp","web-ux-ui-sprint":"/images/packages-real/ux-ui-sprint.webp","web-api-integration-package":"/images/packages-real/api-integration-package.webp","web-pos-deployment-package":"/images/packages-real/pos-deployment-package.webp","software-development-foundation-package":"/images/packages-real/software-delivery-foundation.webp","ai-chatbot-starter":"/images/services/ai-chatbots-v4.webp","ai-business-automation":"/images/services/ai-automation-v2.webp","ai-predictive-ai-pilot":"/images/services/ai-predictive-intelligence-v2.webp","ai-voice-assistant-deployment":"/images/services/ai-voice-assistants-v3.webp","ai-systems-integration-package":"/images/services/ai-integration-services.webp","ai-ml-model-build-deploy":"/images/services/ai-predictive-intelligence-v7.webp","sovran-assistant-growth-retainer-package":"/images/services/growth-consulting-v7.webp","sovran-assistant-enterprise-platform-package":"/images/services/managed-it-support-v2.webp","ai-agent-customer-support":"/images/services/ai-chatbots-v1.webp","ai-agent-customer-support-pro":"/images/services/remote-helpdesk-v2.webp","ai-agent-sales-outreach":"/images/services/growth-consulting-v5.webp","ai-agent-sales-outreach-pro":"/images/services/growth-consulting-v1.webp","ai-agent-appointment-scheduler":"/images/services/consulting-v3.webp","ai-agent-appointment-scheduler-pro":"/images/services/managed-it-support-v5.webp","ai-agent-onboarding":"/images/services/training-workshops-v4.webp","ai-agent-onboarding-pro":"/images/services/training-workshops-v5.webp","ai-agent-knowledge-base":"/images/services/training-workshops-v3.webp","ai-agent-knowledge-base-pro":"/images/services/content-strategy-v7.webp","ai-agent-receptionist":"/images/services/remote-helpdesk-v3.webp","ai-agent-receptionist-pro":"/images/services/remote-helpdesk-v7.webp","ai-voice-crm-widget-starter":"/images/services/ai-voice-assistants-v4.webp","ai-voice-crm-widget-pro":"/images/services/ai-voice-assistants-v1.webp","marketing-seo-starter":"/images/services/seo-optimization-v1.webp","marketing-growth-retainer":"/images/services/marketing-growth-v1.webp","marketing-ppc-growth-package":"/images/services/paid-advertising-ppc-v1.webp","marketing-content-engine-package":"/images/services/content-strategy-v1.webp","marketing-cro-optimization-package":"/images/services/conversion-rate-optimization-v1.webp","marketing-programmatic-performance-package":"/images/services/programmatic-advertising-v1.webp","marketing-international-seo-expansion":"/images/services/international-seo-v1.webp"},W=[[/\b(ai|chatbot|agents?|automation|voice|predictive|machine learning)\b/i,"/images/services/ai-automation.webp"],[/\b(seo|marketing|ppc|content|conversion|cro|programmatic|growth)\b/i,"/images/services/marketing-growth-v1.webp"],[/business website/i,i["web-business"]],[/starter website/i,i["web-starter"]],[/custom web application/i,i["web-custom-app"]],[/e-?commerce/i,i["web-ecommerce-launch-kit"]],[/ux|ui|design sprint/i,i["web-ux-ui-sprint"]],[/api|integration/i,i["web-api-integration-package"]],[/pos/i,i["web-pos-deployment-package"]],[/software delivery|foundation/i,i["software-development-foundation-package"]]];function I(t){const a=i[t.slug];if(a)return a;const r=W.find(([l])=>l.test(t.title));return(r==null?void 0:r[1])??null}function D({categoryId:t}){var v;const{t:a,i18n:r}=A("common"),l=$(r.language),N=z(),[x,u]=m.useState([]),[b,w]=m.useState(!0),o=B[t],d=((v=r.language)==null?void 0:v.startsWith("de"))??!1,_=e=>d&&e.startsWith("/")&&!e.startsWith("/de")?`/de${e}`:e,S=e=>e?d&&{"one-time":"einmalig",project:"Projekt",monthly:"monatlich",month:"Monat",yearly:"jährlich",year:"Jahr"}[e.toLowerCase()]||e:null,C=e=>{N(`/checkout?package=${e}`)};m.useEffect(()=>{let e=!1;async function n(){w(!0);try{const p=await O.get("/public/service-packages",{params:{category_id:t,currency:l}});e||u(p.data)}catch{e||u([])}finally{e||w(!1)}}return n(),()=>{e=!0}},[t,l]);const h=m.useMemo(()=>x.slice().sort((e,n)=>Number(n.is_featured)-Number(e.is_featured)||e.sort_order-n.sort_order),[x]);return!o||!b&&h.length===0?null:s.jsx("section",{className:"py-24 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between mb-12",children:[s.jsxs("div",{children:[s.jsxs("span",{className:g("inline-flex items-center gap-2 rounded-full px-4 py-2 text-xs font-semibold uppercase tracking-[0.18em]",o.lightBg,o.accent),children:[s.jsx(J,{className:"w-4 h-4"}),a("packages.categoryPackages",{category:o.label})]}),s.jsx("h2",{className:"mt-4 text-3xl sm:text-4xl font-bold text-dark-900",children:a("packages.heading")}),s.jsx("p",{className:"mt-4 max-w-2xl text-dark-500 text-lg leading-relaxed",children:a("packages.description")})]}),s.jsxs(f,{to:d?"/de/contact":"/contact",className:"inline-flex items-center gap-2 text-sm font-semibold text-primary-600 hover:text-primary-700 transition-colors",children:[a("packages.customScope"),s.jsx(j,{className:"w-4 h-4"})]})]}),b?s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[1,2,3].map(e=>s.jsx("div",{className:"h-72 rounded-3xl border border-dark-100 bg-dark-50 animate-pulse"},e))}):s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:h.map(e=>{const n=y(e.includes),p=y(e.outcomes),L=!!(e.stripe_price_id||E(e.price_label)),k=I(e);return s.jsxs("div",{className:g("rounded-3xl border bg-white p-7 shadow-sm transition-all",e.is_featured?"border-dark-900 shadow-xl shadow-dark-900/10":"border-dark-100 hover:border-dark-200 hover:shadow-lg hover:shadow-dark-900/[0.05]"),children:[k&&s.jsx("div",{className:"mb-6 overflow-hidden rounded-2xl bg-dark-100",children:s.jsx(F,{src:k,alt:`${e.title} package`,className:"h-48 w-full object-cover transition-transform duration-500 hover:scale-[1.03]",sizes:"(min-width: 1024px) 33vw, 100vw"})}),s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[e.badge&&s.jsx("span",{className:g("inline-flex rounded-full px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.18em]",o.lightBg,o.accent),children:e.badge}),s.jsx("h3",{className:"mt-4 text-2xl font-bold text-dark-900",children:e.title})]}),e.is_featured&&s.jsx("span",{className:"rounded-full bg-dark-900 px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-white",children:a("packages.featured")})]}),s.jsx("p",{className:"mt-4 text-dark-500 leading-relaxed",children:e.short_description}),s.jsxs("div",{className:"mt-6 rounded-2xl border border-dark-100 bg-dark-50/60 p-5",children:[s.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-dark-400",children:a("packages.startingInvestment")}),s.jsx("p",{className:"mt-2 text-2xl font-bold text-dark-900",children:e.price_label||a("packages.customQuote")}),e.billing_period&&s.jsx("p",{className:"mt-1 text-sm text-dark-500",children:S(e.billing_period)})]}),n.length>0&&s.jsxs("div",{className:"mt-6",children:[s.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-dark-400",children:a("packages.included")}),s.jsx("div",{className:"mt-3 space-y-2.5",children:n.map(c=>s.jsxs("div",{className:"flex items-start gap-2 text-sm text-dark-600",children:[s.jsx(M,{className:"w-4 h-4 text-primary-500 shrink-0 mt-0.5"}),s.jsx("span",{children:c})]},c))})]}),p.length>0&&s.jsxs("div",{className:"mt-6",children:[s.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-dark-400",children:a("packages.expectedOutcomes")}),s.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:p.map(c=>s.jsx("span",{className:"inline-flex rounded-full bg-dark-50 px-3 py-1 text-xs font-medium text-dark-600",children:c},c))})]}),s.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-4",children:[L&&s.jsxs("button",{onClick:()=>C(e.id),className:"inline-flex items-center gap-2 rounded-lg bg-primary-600 px-5 py-2.5 text-sm font-semibold text-white hover:bg-primary-700 transition-colors",children:[s.jsx(V,{className:"w-4 h-4"}),a("packages.buyNow")]}),s.jsxs(f,{to:_(e.cta_url||`/contact?package=${e.slug}`),className:"inline-flex items-center gap-2 text-sm font-semibold text-dark-900 hover:text-primary-600 transition-colors",children:[e.cta_text||a("packages.enquire"),s.jsx(j,{className:"w-4 h-4"})]})]})]},e.id)})})]})})}export{D as S};