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

import {Script, console} from "forge-std/Script.sol";
import {FeeCollector} from "../contracts/utils/FeeCollector.sol";

/**
 * @title DeployFeeCollector
 * @notice Deploy FeeCollector contract
 */
contract DeployFeeCollector is Script {
    function run() external {
        uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
        address deployer = vm.addr(deployerPrivateKey);
        
        // Load environment variables
        address admin = vm.envOr("FEE_COLLECTOR_OWNER", deployer);
        
        console.log("Deploying FeeCollector with deployer:", vm.toString(deployer));
        console.log("Admin:", vm.toString(admin));
        
        vm.startBroadcast(deployerPrivateKey);
        
        FeeCollector collector = new FeeCollector(admin);
        console.log("FeeCollector deployed at:", vm.toString(address(collector)));
        
        vm.stopBroadcast();
        
        console.log("\n=== Deployment Summary ===");
        console.log("FeeCollector:", vm.toString(address(collector)));
        console.log("Admin:", vm.toString(admin));
    }
}

