content: module Domain.Action.RiderPlatform.RideBooking.Quote (getQuoteResult) where
  
  import qualified API.Client.RiderPlatform.RideBooking
  import qualified "rider-app" Domain.Action.UI.Quote
  import qualified "lib-dashboard" Domain.Types.Merchant
  import qualified "rider-app" Domain.Types.Person
  import qualified "rider-app" Domain.Types.SearchRequest
  import qualified "lib-dashboard" Environment
  import EulerHS.Prelude
  import qualified Kernel.Types.Beckn.Context
  import qualified Kernel.Types.Id
  import Storage.Beam.CommonInstances ()
  import Tools.Auth.Api
  import Tools.Auth.Merchant
  
  getQuoteResult :: (Kernel.Types.Id.ShortId Domain.Types.Merchant.Merchant -> Kernel.Types.Beckn.Context.City -> ApiTokenInfo -> Kernel.Types.Id.Id Domain.Types.SearchRequest.SearchRequest -> Kernel.Types.Id.Id Domain.Types.Person.Person -> Environment.Flow Domain.Action.UI.Quote.GetQuotesRes)
  getQuoteResult merchantShortId opCity apiTokenInfo searchId customerId = do
    checkedMerchantId <- merchantCityAccessCheck merchantShortId apiTokenInfo.merchant.shortId opCity apiTokenInfo.city
    API.Client.RiderPlatform.RideBooking.callRideBookingAPI checkedMerchantId opCity (.quoteDSL.getQuoteResult) searchId customerId
  