                                  (assoc :dragover? (= drop-idx (:idx page) ))
                                  (mark-page-selected (:selected selection))))}))]]))
 
+(ui/defcomponent new-document-ui [[state column] owner]
+  (render-state [_ {:keys [handle-drop!]}]
+    [:.column {:on-drag-over (fn [e] (.preventDefault e))
+               :on-drop (fn [e]
+                          (println "[new-document-ui] on-drop")
+                          (let [source-column (get-transfer-data e "application/x-pepa-column")
+                                page-ids (get-transfer-data e "application/x-pepa-pages")]
+                            ;; Delegate to `inbox'
+                            (handle-drop! (:id column)
+                                          source-column
+                                          page-ids
+                                          0)))}
+     [:header
+      (column-title column state)]
+     [:.center
+      "Drag pages here or press \"Open to open a file or document"
+      [:button {:on-click (fn [e]
+                            (ui/cancel-event e)
+                            (add-column! (current-columns state) [:document 1]))}
+       "Open"]]]))
+
 (defn ^:private inbox-handle-drop! [state owner page-cache target source page-ids target-idx]
   (let [columns (om/get-state owner :columns)
         target  (first (filter #(= (:id %) target) columns))

    (assert (number? document-id))
    (api/fetch-documents! [document-id])))

(defrecord NewDocumentColumnSource [id]
  ColumnSource
  (column-title [_ _]
    "Create New Document")

  ;; TODO: Handle immutable column sources
  ;; TODO: How do we handle removal of the last page for documents?
  (remove-pages! [_ state page-ids]))

(defprotocol SpecialColumn
  (special-column-ui [_]))

(defn special-column? [x]
  (satisfies? SpecialColumn x))

(defprotocol ColumnDropTarget
  (accept-drop! [_ state pages target-idx]))
