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

import {ICryptobox} from "./ICryptobox.sol";

/**
    @title ICryptoboxFactory 
    @author iMe Lab
    @notice Factory iMe Cryptoboxes
 */
interface ICryptoboxFactory {
    event RulesChanged();
    event CryptoboxCreated(address addr);

    error NotEnoughParticipants();
    error FactoryIsDisabled();
    error CryptoboxFundingFailed();

    function create(ICryptobox.Info memory, address) external payable;

    function getFeeToken() external view returns (address);

    function setFeeToken(address) external;

    function getFeeDestination() external view returns (address);

    function setFeeDestination(address) external;

    function getParticipantFee() external view returns (uint256);

    function setParticipantFee(uint256) external;

    function getCreationFee() external view returns (uint256);

    function setCreationFee(uint256) external;

    function getMinimalCapacity() external view returns (uint32);

    function setMinimalCapacity(uint32) external;

    function isEnabled() external view returns (bool);

    function enable() external;

    function disable() external;
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CryptoboxFundingFailed","type":"error"},{"inputs":[],"name":"CurrencyTransferFailed","type":"error"},{"inputs":[],"name":"FactoryIsDisabled","type":"error"},{"inputs":[],"name":"NotEnoughParticipants","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"CryptoboxCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"RulesChanged","type":"event"},{"inputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint32","name":"capacity","type":"uint32"},{"internalType":"uint256","name":"prize","type":"uint256"}],"internalType":"struct ICryptobox.Info","name":"blueprint","type":"tuple"},{"internalType":"address","name":"signer","type":"address"}],"name":"create","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"disable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCreationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeDestination","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinimalCapacity","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getParticipantFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setCreationFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"destination","type":"address"}],"name":"setFeeDestination","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"setFeeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"capacity","type":"uint32"}],"name":"setMinimalCapacity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setParticipantFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"}]