             [hatti.shared :as shared]
             [hatti.utils :refer [click-fn generate-html hyphen->camel-case]]
             [cljsjs.slickgrid-with-deps]))
-
+(enable-console-print!)
 (def default-num-displayed-records 25)
 
 ;; DIVS

  ([form] (flat-form->sg-columns form true))
  ([form get-label?] (flat-form->sg-columns form get-label? nil))
  ([form get-label? language & {:keys [is-filtered-dataview? owner]}]
   (let [columns (for [field (all-fields form :is-filtered-dataview?
                                         is-filtered-dataview?)]
                   (let [{:keys [name type full-name], {:keys [hxl]} :instance} field
                         label (if get-label? (get-label field language) name)]
                     {:id name
                      :field full-name
                      :type type
                      :name (if hxl (str label "<div class=\"hxl-row\">" hxl "</div>") label)
                      :toolTip label
                      :sortable true
                      :formatter (partial formatter field language)
                      :headerCssClass (get-column-class field)
                      :cssClass (get-column-class field)
                      :minWidth 50
                      :hxl hxl}))]
     (clj->js (conj columns (actions-column owner))))))

(defn- init-sg-pager [grid dataview]
  (let [Pager (.. js/Slick -Controls -Pager)]

            [:i.fa.fa-pencil-square-o]]]])))))

(defn actions-column
  [owner has-hxl?]
  {:id "actions"
   :field _id
   :type "text"
   :name ""
   :toolTip ""
   :sortable false
   :formatter (action-buttons owner)
   :headerCssClass (str (when has-hxl? "hxl-min-height ") "record-actions header")
   :cssClass "record-actions"
   :maxWidth 70})

