(.require
 [library
  [lux (.except)
   [data
    [text
     ["%" \\format (.only format)]]
    [collection
     ["[0]" list (.use "[1]#[0]" mix)]]]
   [meta
    [type
     [primitive (.except)]]]]]
 ["[0]" //
  ["[1][0]" value (.only Value)]
  ["[1][0]" property (.only Property)]])

(primitive .public Style
  Text

  (def .public empty
    Style
    (abstraction ""))

  (def .public (with [property value])
    (All (_ brand)
      (-> [(Property brand) (Value brand)]
          (-> Style Style)))
    (|>> representation
         (format (//property.name property) ": " (//value.value value) ";")
         abstraction))

  (def .public inline
    (-> Style Text)
    (|>> representation))

  (def .public (style config)
    (-> (List (Ex (_ brand) [(Property brand) (Value brand)]))
        Style)
    (list#mix ..with ..empty config))
  )
