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

import {IGhostAuthority} from "./interfaces/IGhostAuthority.sol";
import {GhostAccessControlled} from "./types/GhostAccessControlled.sol";

contract GhostAuthority is IGhostAuthority, GhostAccessControlled {
    address public override governor;
    address public override guardian;
    address public override policy;
    address public override vault;

    constructor(
        address _governor,
        address _guardian,
        address _policy,
        address _vault
    ) GhostAccessControlled(IGhostAuthority(address(this))) {
        governor = _governor;
        guardian = _guardian;
        policy = _policy;
        vault = _vault;
    }

    function pushGovernor(address newGovernor) external onlyGovernor {
        emit GovernorPushed(governor, newGovernor);
        governor = newGovernor;
    }

    function pushGuardian(address newGuardian) external onlyGovernor {
        emit GuardianPushed(guardian, newGuardian);
        guardian = newGuardian;
    }

    function pushPolicy(address newPolicy) external onlyGovernor {
        emit PolicyPushed(policy, newPolicy);
        policy = newPolicy;
    }

    function pushVault(address newVault) external onlyGovernor {
        emit VaultPushed(vault, newVault);
        vault = newVault;
    }

}
