from flask import Flask
from flask_cors import CORS

app  = Flask(__name__)
CORS(app)
from routes.amazon import amazonBlueprint
from routes.app import appBlueprint
from routes.batches import batchesBlueprint
from routes.bigcartel import bigcartelBlueprint
from routes.ebay import ebayBlueprint
from routes.etsy import etsyBlueprint
from routes.invoices import invoicesBlueprint
#Blueprints
from routes.orders import ordersBlueprint
from routes.pricing import pricingBlueprint
from routes.products import ProductsBlueprint
from routes.shipments import shipmentsBlueprint
from routes.shipstation import shipstationBlueprint
from routes.shopify import shopifyBlueprint
from routes.square import squareBlueprint
from routes.squarespace import squarespaceBlueprint
from routes.suppliers import suppliersBlueprint
from routes.webhooks import webhooksBlueprint
from routes.woocommerce import woocommerceBlueprint
from V2.main import v2

# from routes.images import imageBlueprint
app.register_blueprint(etsyBlueprint, url_prefix = "/etsy")
app.register_blueprint(suppliersBlueprint, url_prefix = "/suppliers")
app.register_blueprint(shopifyBlueprint, url_prefix = "/shopify")
app.register_blueprint(batchesBlueprint, url_prefix = "/batches")
app.register_blueprint(woocommerceBlueprint, url_prefix = "/woocommerce")
app.register_blueprint(ProductsBlueprint, url_prefix = "/products")
app.register_blueprint(ordersBlueprint, url_prefix = "/orders")
app.register_blueprint(shipmentsBlueprint, url_prefix = "/shipments")
app.register_blueprint(invoicesBlueprint, url_prefix = "/invoices")
app.register_blueprint(webhooksBlueprint, url_prefix = "/webhooks")
app.register_blueprint(squareBlueprint, url_prefix = "/square")
app.register_blueprint(ebayBlueprint, url_prefix = "/ebay")
app.register_blueprint(shipstationBlueprint, url_prefix = "/shipstation")
app.register_blueprint(amazonBlueprint, url_prefix = "/amazon")
app.register_blueprint(pricingBlueprint, url_prefix = "/pricing")
app.register_blueprint(bigcartelBlueprint, url_prefix = "/bigcartel")
app.register_blueprint(squarespaceBlueprint, url_prefix = "/squarespace")
app.register_blueprint(appBlueprint, url_prefix = "/app")
app.register_blueprint(v2, url_prefix = "/v2")


if __name__ == "__main__":
    # Run the Flask app on a specific port
    app.run(host='0.0.0.0', port=9008)  # Change port number if needed