from flask import Blueprint
from controllers.DictController import Home, Listing, Search, AddDict
from controllers.SentenceController import TenceListing, TenceSearch, AddTense
from controllers.UserController import Login, CheckUserLogin
from controllers.IdiomsController import IdiomsListing, IdiomsSearch, AddIdiom
from controllers.BlogController import BlogListing, BlogSearch, AddBlog

main_bp = Blueprint('main_bp', __name__)

main_bp.route("/", methods=['GET'])(Home)
main_bp.route("/dictionary/listing", methods=['GET'])(Listing)
main_bp.route("/dictionary/search", methods=['POST'])(Search)
main_bp.route("/sentences/listing", methods=['GET'])(TenceListing)
main_bp.route("/sentences/search", methods=['POST'])(TenceSearch)

main_bp.route("/idioms/listing", methods=['GET'])(IdiomsListing)
main_bp.route("/idioms/search", methods=['POST'])(IdiomsSearch)
main_bp.route("/add-idioms", methods=['POST'])(AddIdiom)

main_bp.route("/blogs/listing", methods=['GET'])(BlogListing)
main_bp.route("/blogs/search", methods=['POST'])(BlogSearch)
main_bp.route("/add-blog", methods=['POST'])(AddBlog)

main_bp.route("/login", methods=['POST'])(Login)
main_bp.route("/checkusertoken", methods=['POST'])(CheckUserLogin)
main_bp.route("/add-dictionary", methods=['POST'])(AddDict)
main_bp.route("/add-tence", methods=['POST'])(AddTense)