const { GetCategoryUseCase } = require('./use-cases/get-category-use-case.js')
const { CategoryConverterUseCase } = require('./use-cases/category-converter-use-case.js')

const categoriesMapping = require('./etc/categories-mapping.json')

const getCategory = new GetCategoryUseCase();
const categoryConverter = new CategoryConverterUseCase({categoriesMapping});

module.exports = async function app(domain){
  const category = await getCategory.execute(domain)
  const categoryConverted = await categoryConverter.execute(category)
  console.log(categoryConverted)
  return categoryConverted
}


// const categoryConverter = new CategoryConverterUseCase({ categoriesMapping })

