 )		
 
 
-(rum/defc seat-plan < rum/cursored-watch rum/reactive [app-state]
+(rum/defc seat-plan < rum/cursored-watch [app-state]
 	(let [seats (rum/cursor app-state [:seats])
 
+	      parter-rows (range 1 14)
 		  side_rows (range 1 12)
-		  house_rows (range 1 14)
+		  back_house_rows (range 14 21)
 
 		  left_side_cols (reverse (range 37 40))
 		  right_side_cols (reverse (range 1 4))
-
 		  left_house_cols (reverse (range 20 37))
 		  right_house_cols (reverse (range 4 20)) 		
 
-		  back_house_rows (range 14 21)
 	      beletage_cols (range 1 32)
 
 	      beletage_last_cols (range 1 26)
 	      beletage_last_rows (range 21 22)
 		
-	      parter-rows (range 1 14)
 		]
 
 		[:div.seat-plan {:key "root"}

		]
		[:div {:x x :y y 
				:onClick seat-click
			 	:class (if-not @current "seat" ["seat" (get @current :status)]
			 				)
			 	;:class (reduce conj ["seat"] 
				;			(if-not (@seats id)

(defn- attr[el n]
	(.getAttribute el n))

(defn- range-key [r] 
    [(first r) (last r)])

;;;;;

(def renders (atom 0))


(rum/defc booking-info  < rum/cursored-watch [app-state]
	(let [seats (rum/cursor app-state [:seats])
		  booked (filter 
   					(fn [[k {status :status}]]
     					(= "pending" status)) @seats)]
		[:div 
			[:pre (pr-str booked)]
		[:hr]
		[:button {:onClick (fn[e] 
			(.warn js/console (.now js/Date))
			(swap! app-state assoc-in [:seats "21-1" :status] 
				"pending")
			)} "piy!"]
		[:hr]
		[:pre (str "renders: " (pr-str @renders))]
		]
	)
)
