;; Order detail components (defcomp ~orders-item-image (&key src alt) (img :src src :alt alt :class "w-full h-full object-contain object-center" :loading "lazy" :decoding "async")) (defcomp ~orders-item-no-image () (div :class "w-full h-full flex items-center justify-center text-[9px] text-stone-400" "No image")) (defcomp ~orders-item-row (&key href img-html title pid qty price) (li (a :class "w-full py-2 flex gap-3" :href href (div :class "w-12 h-12 sm:w-14 sm:h-14 rounded-md bg-stone-100 flex-shrink-0 overflow-hidden" (raw! img-html)) (div :class "flex-1 flex justify-between gap-3" (div (p :class "font-medium" (raw! title)) (p :class "text-[11px] text-stone-500" "Product ID: " (raw! pid))) (div :class "text-right whitespace-nowrap" (p "Qty: " (raw! qty)) (p (raw! price))))))) (defcomp ~orders-items-section (&key items-html) (div :class "rounded-2xl border border-stone-200 bg-white/80 p-4 sm:p-6" (h2 :class "text-sm sm:text-base font-semibold mb-3" "Items") (ul :class "divide-y divide-stone-100 text-xs sm:text-sm" (raw! items-html)))) (defcomp ~orders-calendar-item (&key name pill state ds cost) (li :class "px-4 py-3 flex items-start justify-between text-sm" (div (div :class "font-medium flex items-center gap-2" (raw! name) (span :class pill (raw! state))) (div :class "text-xs text-stone-500" (raw! ds))) (div :class "ml-4 font-medium" (raw! cost)))) (defcomp ~orders-calendar-section (&key items-html) (section :class "mt-6 space-y-3" (h2 :class "text-base sm:text-lg font-semibold" "Calendar bookings in this order") (ul :class "divide-y divide-stone-200 rounded-2xl border border-stone-200 bg-white/80" (raw! items-html)))) (defcomp ~orders-detail-panel (&key summary-html items-html calendar-html) (div :class "max-w-full px-3 py-3 space-y-4" (raw! summary-html) (raw! items-html) (raw! calendar-html))) (defcomp ~orders-detail-header-stack (&key auth-html orders-html order-html) (div :id "root-header-child" :class "flex flex-col w-full items-center" (raw! auth-html) (div :id "auth-header-child" :class "flex flex-col w-full items-center" (raw! orders-html) (div :id "orders-header-child" :class "flex flex-col w-full items-center" (raw! order-html))))) (defcomp ~orders-header-child-oob (&key inner-html) (div :id "orders-header-child" :hx-swap-oob "outerHTML" :class "flex flex-col w-full items-center" (raw! inner-html)))