const {
    Telegraf,
    Scenes,
    session,
    Stage,
    Markup
} = require('telegraf')

const crime = require('./crime')
console.log(crime)
const pocketsteal = require('./pocketsteal')
console.log(pocketsteal)
let test = [crime, pocketsteal]
console.log(test)

const stage = new Scenes.Stage([
  crime, 
  pocketsteal
])

stage.use((ctx, next) => {
  if (!ctx.session.scene) ctx.session.scene = {}
  return next()
})

stage.hears(([
  'Криминал'
]), async (ctx, next) => {
  await ctx.scene.leave()
  ctx.session.scene = null
  await next()
})


module.exports = stage