   (:require
    [schema.core :as s]
    [modular.ring :refer (WebRequestHandler)]
-   [com.stuartsierra.component :as component]
+   [com.stuartsierra.component :as component :refer (Lifecycle)]
    [bidi.bidi :as bidi :refer (match-route resolve-handler)]
    [bidi.ring :refer (resources-maybe make-handler)]
    [clojure.tools.logging :refer :all]

       map->WebServiceFromArguments))

(defrecord StaticResourceService [uri-context resource-prefix]
  WebService
  (request-handlers [_] {})
  (routes [_]
    [uri-context (resources-maybe {:prefix resource-prefix})])
  (uri-context [_] "/"))

(def new-static-resource-service-schema
  {:uri-context s/Str


(defn new-static-resource-service [& {:as opts}]
  (->> opts
    (merge {:uri-context "/"})
    (s/validate new-static-resource-service-schema)
    (map->StaticResourceService)))

;; Production of a Ring handler from a single WebService component

