use std::sync::Arc;
use mithril_common::api_version::APIVersionProvider;
use mithril_common::cardano_transactions_preloader::CardanoTransactionsPreloader;
use mithril_common::chain_observer::ChainObserver;
use mithril_common::digesters::ImmutableDigester;
use mithril_common::era::{EraChecker, EraReader};
use mithril_common::signable_builder::SignableBuilderService;
use mithril_common::signed_entity_type_lock::SignedEntityTypeLock;
use mithril_common::TickerService;
use mithril_persistence::store::StakeStorer;
use tokio::sync::RwLock;
use crate::services::{
AggregatorClient, CertifierService, EpochService, SingleSigner, UpkeepService,
};
use crate::store::ProtocolInitializerStorer;
use crate::MetricsService;
type StakeStoreService = Arc<dyn StakeStorer>;
type CertificateHandlerService = Arc<dyn AggregatorClient>;
type ChainObserverService = Arc<dyn ChainObserver>;
type DigesterService = Arc<dyn ImmutableDigester>;
type SingleSignerService = Arc<dyn SingleSigner>;
type TimePointProviderService = Arc<dyn TickerService>;
type ProtocolInitializerStoreService = Arc<dyn ProtocolInitializerStorer>;
pub type EpochServiceWrapper = Arc<RwLock<dyn EpochService>>;
pub struct SignerDependencyContainer {
pub ticker_service: TimePointProviderService,
pub stake_store: StakeStoreService,
pub certificate_handler: CertificateHandlerService,
pub chain_observer: ChainObserverService,
pub digester: DigesterService,
pub single_signer: SingleSignerService,
pub protocol_initializer_store: ProtocolInitializerStoreService,
pub era_checker: Arc<EraChecker>,
pub era_reader: Arc<EraReader>,
pub api_version_provider: Arc<APIVersionProvider>,
pub signable_builder_service: Arc<dyn SignableBuilderService>,
pub metrics_service: Arc<MetricsService>,
pub signed_entity_type_lock: Arc<SignedEntityTypeLock>,
pub cardano_transactions_preloader: Arc<CardanoTransactionsPreloader>,
pub upkeep_service: Arc<dyn UpkeepService>,
pub epoch_service: EpochServiceWrapper,
pub certifier: Arc<dyn CertifierService>,
}