// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

import "../IVaultfireIdentity.sol";

/// @dev Mock identity registry for testing. Allows manually registering addresses.
contract MockIdentityRegistry is IVaultfireIdentity {
    mapping(address => bool) private _registered;
    mapping(address => uint256) private _registeredAt;

    function register(address agent) external {
        _registered[agent] = true;
        _registeredAt[agent] = block.timestamp;
    }

    function unregister(address agent) external {
        _registered[agent] = false;
    }

    function getAgent(address agent)
        external
        view
        override
        returns (
            string memory agentURI,
            bool active,
            string memory agentType,
            uint256 registeredAt
        )
    {
        if (_registered[agent]) {
            return (
                '{"name":"mock-agent"}',
                true,
                "agent",
                _registeredAt[agent]
            );
        }
        return ("", false, "", 0);
    }
}
