;; Cart ticket components (defcomp ~tickets/type-name (&key (name :as string)) (p :class "mt-0.5 text-[0.7rem] sm:text-xs text-stone-500" name)) (defcomp ~tickets/type-hidden (&key (value :as string)) (input :type "hidden" :name "ticket_type_id" :value value)) (defcomp ~tickets/article (&key (name :as string) type-name (date-str :as string) (price :as string) (qty-url :as string) (csrf :as string) (entry-id :as string) type-hidden (minus :as string) (qty :as string) (plus :as string) (line-total :as string)) (article :class "flex flex-col sm:flex-row gap-3 sm:gap-4 rounded-2xl bg-white shadow-sm border border-stone-200 p-3 sm:p-4" (div :class "flex-1 min-w-0" (div :class "flex flex-col sm:flex-row sm:items-start justify-between gap-2 sm:gap-3" (div :class "min-w-0" (h3 :class "text-sm sm:text-base font-semibold text-stone-900" name) type-name (p :class "mt-0.5 text-[0.7rem] sm:text-xs text-stone-500" date-str)) (div :class "text-left sm:text-right" (p :class "text-sm sm:text-base font-semibold text-stone-900" price))) (div :class "mt-3 flex flex-col sm:flex-row sm:items-center justify-between gap-2 sm:gap-4" (div :class "flex items-center gap-2 text-xs sm:text-sm text-stone-700" (span :class "text-[0.65rem] sm:text-xs uppercase tracking-wide text-stone-500" "Quantity") (form :action qty-url :method "post" :sx-post qty-url :sx-swap "none" (input :type "hidden" :name "csrf_token" :value csrf) (input :type "hidden" :name "entry_id" :value entry-id) type-hidden (input :type "hidden" :name "count" :value minus) (button :type "submit" :class "inline-flex items-center justify-center w-8 h-8 text-sm font-medium rounded-full border border-emerald-600 text-emerald-700 hover:bg-emerald-50 text-xl" "-")) (span :class "inline-flex items-center justify-center px-2 py-1 rounded-full bg-stone-100 text-[0.7rem] sm:text-xs font-medium" qty) (form :action qty-url :method "post" :sx-post qty-url :sx-swap "none" (input :type "hidden" :name "csrf_token" :value csrf) (input :type "hidden" :name "entry_id" :value entry-id) type-hidden (input :type "hidden" :name "count" :value plus) (button :type "submit" :class "inline-flex items-center justify-center w-8 h-8 text-sm font-medium rounded-full border border-emerald-600 text-emerald-700 hover:bg-emerald-50 text-xl" "+"))) (div :class "flex items-center justify-between sm:justify-end gap-3" (p :class "text-sm sm:text-base font-semibold text-stone-900" line-total)))))) (defcomp ~tickets/section (&key items) (div :class "mt-6 border-t border-stone-200 pt-4" (h2 :class "text-base font-semibold mb-2" (i :class "fa fa-ticket mr-1" :aria-hidden "true") " Event tickets") (div :class "space-y-3" items)))