lms/public/build/assets/course-card-DozTjmPI.js
2025-12-15 12:26:23 +01:00

2 lines
1.6 KiB
JavaScript

import{u as n,b as d,j as s,i as m}from"./vendor-BKmmeuxg.js";import{B as r}from"./button-BpNwv2aE.js";import{C as o,b as c}from"./card-D9_SJYq6.js";import{s as x}from"./utils-DxSsnXxD.js";import"./index-WW_1X1qx.js";const g=({course:e})=>{const{system:t}=n().props,{delete:i,processing:a}=d(),l=x(t.fields.selling_currency);return s.jsx(o,{className:"overflow-hidden",children:s.jsx(c,{className:"p-0",children:s.jsxs("div",{className:"flex flex-col md:flex-row",children:[s.jsx("div",{className:"bg-muted h-48 w-full overflow-hidden md:w-60",children:s.jsx("img",{alt:e.title,className:"h-full w-full object-cover",src:e.thumbnail??"/assets/images/blank-image.jpg"})}),s.jsxs("div",{className:"flex flex-1 flex-col justify-between p-5",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"mb-2 text-xl font-semibold",children:e.title}),s.jsx("p",{className:"text-muted-foreground mb-4 line-clamp-2",children:e.short_description})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("p",{className:"capitalize",children:e.pricing_type==="free"?e.pricing_type:e.discount?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xl font-bold",children:[l==null?void 0:l.symbol,e.discount_price]}),s.jsxs("span",{className:"text-muted-foreground ml-2 text-sm line-through",children:[l==null?void 0:l.symbol,e.price]})]}):s.jsx(s.Fragment,{children:s.jsxs("span",{className:"text-xl font-bold",children:[l==null?void 0:l.symbol,e.price]})})}),s.jsx(r,{size:"icon",variant:"ghost",onClick:()=>i(route("course-cart.destroy",e.id)),disabled:a,children:s.jsx(m,{className:"h-5 w-5"})})]})]})]})})})};export{g as default};