from werkzeug.security import generate_password_hash, check_password_hash

def get_available_products(db, seller_id):
    return list(db.products.find({"seller_id": seller_id, "stock": {"$gt": 0}}))

def get_sold_out_products(db, seller_id):
    return list(db.products.find({"seller_id": seller_id, "stock": 0}))

def insert_product(db, data):
    return db.products.insert_one(data)

def get_seller_profile(db, seller_id):
    return db.users.find_one({"_id": seller_id, "type": "seller"})


