(defn compile-merge-attrs [attrs-1 attrs-2]
(let [empty-attrs? #(or (nil? %1) (and (map? %1) (empty? %1)))]
(cond
(and (empty-attrs? attrs-1)
(empty-attrs? attrs-2))
nil
(empty-attrs? attrs-1)
`(sablono.interpreter/attributes ~attrs-2)
(empty-attrs? attrs-2)
`(sablono.interpreter/attributes ~attrs-1)
(and (map? attrs-1)
(map? attrs-2))
(normalize/merge-with-class attrs-1 attrs-2)
:else `(sablono.interpreter/attributes
(sablono.normalize/merge-with-class ~attrs-1 ~attrs-2)))))