"""
Dhan — NOT IMPLEMENTED.
PHASE-2 FIX (Goals 5 & 6): this used to unconditionally fake a successful
connect/order response with zero real API calls. It now honestly reports
failure everywhere so it can never be mistaken for a working broker, either
directly via /broker/test/dhan or through the autonomous engine's failover
chain (which no longer lists it — see app/autonomous/broker_allocator.py).
"""
from app.broker.base_broker import BaseBroker

_NOT_IMPLEMENTED = "Dhan integration is not implemented — no real API calls are made."


class DhanBroker(BaseBroker):

    def connect(self):
        return {"success": False, "message": _NOT_IMPLEMENTED}

    def disconnect(self):
        return {"success": True}

    def is_connected(self):
        return False

    def profile(self):
        return {"success": False, "message": _NOT_IMPLEMENTED}

    def funds(self):
        return {"success": False, "message": _NOT_IMPLEMENTED}

    def holdings(self):
        return []

    def positions(self):
        return []

    def orders(self):
        return []

    def place_order(self, order):
        return {"success": False, "status": "error", "message": _NOT_IMPLEMENTED}

    def modify_order(self, order_id, order):
        return {"success": False, "status": "error", "message": _NOT_IMPLEMENTED}

    def cancel_order(self, order_id):
        return {"success": False, "status": "error", "message": _NOT_IMPLEMENTED}

    def quotes(self, symbol):
        return {}

    def historical_data(self, symbol):
        return []

    def live_data(self, symbol):
        return {}
