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

import {Script, console2} from "forge-std/Script.sol";
import {PolicyProfileRegistry} from "../../contracts/universal-resource/PolicyProfileRegistry.sol";

/// @notice Deploy standalone URA policy profile anchor (not full GRU M00). Set POLICY_PROFILE_REGISTRY_ADMIN or defaults to deployer.
contract DeployPolicyProfileRegistry is Script {
    function run() external {
        uint256 pk = vm.envUint("PRIVATE_KEY");
        address deployer = vm.addr(pk);
        address admin = vm.envOr("POLICY_PROFILE_REGISTRY_ADMIN", deployer);

        vm.startBroadcast(pk);
        PolicyProfileRegistry reg = new PolicyProfileRegistry(admin);
        vm.stopBroadcast();

        console2.log("PolicyProfileRegistry", address(reg));
        console2.log("admin", admin);
    }
}
