;; Events header components

(defcomp ~events-calendars-label ()
  (<> (i :class "fa fa-calendar" :aria-hidden "true") (div "Calendars")))

(defcomp ~events-markets-label ()
  (<> (i :class "fa fa-shopping-bag" :aria-hidden "true") (div "Markets")))

(defcomp ~events-calendar-label (&key name description)
  (div :class "flex flex-col md:flex-row md:gap-2 items-center min-w-0"
    (div :class "flex flex-row items-center gap-2"
      (i :class "fa fa-calendar")
      (div :class "shrink-0" name))
    (div :id "calendar-description-title"
         :class "text-base font-normal break-words whitespace-normal min-w-0 break-all w-full text-center block"
      description)))

(defcomp ~events-day-label (&key date-str)
  (div :class "flex gap-1 items-center"
    (i :class "fa fa-calendar-day")
    (span date-str)))

(defcomp ~events-entry-label (&key entry-id title times)
  (div :id (str "entry-title-" entry-id) :class "flex gap-1 items-center"
    title times))

(defcomp ~events-slot-label (&key name description)
  (div :class "flex flex-col md:flex-row md:gap-2 items-center"
    (div :class "flex flex-row items-center gap-2"
      (i :class "fa fa-clock")
      (div :class "shrink-0" name))
    (p :class "text-stone-500 whitespace-pre-line break-all w-full" description)))

