;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC

(ns app.util.code-gen
  (:require
   [app.util.code-gen.markup-html :as html]
   [app.util.code-gen.markup-svg :as svg]
   [app.util.code-gen.style-css :as css]))

(defn generate-markup-code
  [objects type shapes]
  (let [generate-markup
        (case type
          "html" html/generate-markup
          "svg"  svg/generate-markup)]
    (generate-markup objects shapes)))

(defn generate-style-code
  [objects type root-shapes all-shapes]
  (let [generate-style
        (case type
          "css" css/generate-style)]
    (generate-style objects root-shapes all-shapes)))
