 (ns hatti.ona.forms
   (:require [chimera.js-interop :refer [format]]
             [chimera.urls :refer [last-url-param]]
-            [ona.utils.urls :as urls]
-            [ona.utils.i18n :refer [translate]]
             [chimera.date :as chimera-date]
             [cljs.pprint :refer [cl-format]]
             [clojure.string :as string]

    (or (image? field)
        (video? field)) (let [image (:download_url answer)
                              thumb (or (:small_download_url answer) image)
                              media-upload-fail-hlp-url
                              urls/media-upload-fail-during-submission-help
                              media-upload-fail-translation-txt
                              (translate
                               :table-data-view-page/media-upload-fail-err-msg)
                              fname (last-url-param (:filename answer))]
                          (cond
                            (and (string? answer)
                                 (not= answer "null") (nil? thumb))
                            (media-files-upload-error-component
                             answer
                             :hlp-url
                             media-upload-fail-hlp-url
                             :translation-txt
                             media-upload-fail-translation-txt
                             :record-modal?
                             record-modal?)
                            (= answer "null") answer

(def media_received_field {:name      _media_all_received
                           :full-name _media_all_received
                           :label     "All media received?"
                           :type      "text"})

(def extra-submission-details [last_edited
                               submission-time-field
