import{aT as m,j as e,cJ as d,cG as o,cI as x,b4 as p,cK as j,b2 as h,cL as u}from"./react-vendor-xYZnmIII.js";import{a6 as f,J as g,K as N,M as y,aa as b}from"./ui-components-CQM92IK3.js";import{V as v}from"./video-player-C1vwhm7_.js";import{c as w}from"./course-languages-DcPHNS0l.js";import C from"./course-player-button-BA30SOIY.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";import"./checkout-item-COhV8mha.js";const L=()=>{var t;const{course:s,system:r,translate:n}=m().props,{frontend:a}=n,{amount:l}=f(r.fields.selling_currency),i=w.find(c=>c.value===s.language);return e.jsxs("div",{className:"bg-card sticky top-24 space-y-5 rounded-lg border p-5 shadow",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx("img",{className:"w-full rounded-lg",src:(t=s.thumbnail)!=null?t:"/assets/images/blank-image.jpg",alt:""}),s.preview&&e.jsxs(g,{children:[e.jsx(N,{asChild:!0,children:e.jsx("button",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 cursor-pointer rounded-full bg-black/70 p-4 transition-transform hover:scale-110",children:e.jsx(d,{className:"h-6 w-6 text-white"})})}),e.jsx(y,{className:"overflow-hidden p-0 md:min-w-3xl",children:e.jsx(v,{source:{type:"video",sources:[{src:s.preview,type:"video/mp4"}]}})})]})]}),e.jsx("h2",{className:"text-4xl font-bold capitalize",children:s.pricing_type==="free"?s.pricing_type:s.discount?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-semibold",children:l(s.discount_price)}),e.jsx("span",{className:"text-muted-foreground ml-2 text-base font-medium line-through",children:l(s.price)})]}):e.jsx(e.Fragment,{children:e.jsx("span",{className:"font-semibold",children:l(s.price)})})}),e.jsx(C,{})]}),e.jsxs("div",{className:"space-y-4 pt-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(o,{className:"h-5 w-5"}),a.students]}),e.jsx("span",{children:s.enrollments_count||0})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(x,{className:"h-5 w-5"}),a.language]}),e.jsx("span",{children:i==null?void 0:i.label})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(p,{className:"h-5 w-5"}),a.duration]}),e.jsx("span",{children:b(s)})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"h-5 w-5"}),a.level]}),e.jsx("span",{className:"capitalize",children:s.level})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(h,{className:"h-5 w-5"}),a.expiry_period]}),e.jsx("span",{className:"capitalize",children:s.expiry_type==="lifetime"?"lifetime":s==null?void 0:s.expiry_duration})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(u,{className:"h-5 w-5"}),a.certificate_included]}),e.jsx("span",{children:"Yes"})]})]})]})};export{L as default};
