// Storage indices integration checks
#[cfg(not(feature = "tanssi"))]
use evm_runtime_template::{Aura, AuraExt, Authorship, CollatorSelection, Session};
use evm_runtime_template::{
    Balances, PezcumulusXcm, MessageQueue, Multisig, TeyrChainInfo, TeyrChainSystem, PezkuwiXcm,
    Proxy, Runtime, Sudo, System, Timestamp, TransactionPayment, XcmpQueue,
};
use pezframe_support::traits::PezpalletInfo;

fn assert_pezpallet_prefix<P: 'static>(name: &str) {
    assert_eq!(<Runtime as frame_system::Config>::PezpalletInfo::name::<P>(), Some(name));
}

#[test]
fn verify_pezpallet_prefixes() {
    assert_pezpallet_prefix::<System>("System");
    assert_pezpallet_prefix::<TeyrChainSystem>("TeyrChainSystem");
    assert_pezpallet_prefix::<Timestamp>("Timestamp");
    assert_pezpallet_prefix::<TeyrChainInfo>("TeyrChainInfo");
    assert_pezpallet_prefix::<Proxy>("Proxy");
    assert_pezpallet_prefix::<Balances>("Balances");
    assert_pezpallet_prefix::<TransactionPayment>("TransactionPayment");
    assert_pezpallet_prefix::<Sudo>("Sudo");
    assert_pezpallet_prefix::<Multisig>("Multisig");
    assert_pezpallet_prefix::<XcmpQueue>("XcmpQueue");
    assert_pezpallet_prefix::<PezkuwiXcm>("PezkuwiXcm");
    assert_pezpallet_prefix::<PezcumulusXcm>("PezcumulusXcm");
    assert_pezpallet_prefix::<MessageQueue>("MessageQueue");

    #[cfg(not(feature = "tanssi"))]
    {
        assert_pezpallet_prefix::<Authorship>("Authorship");
        assert_pezpallet_prefix::<CollatorSelection>("CollatorSelection");
        assert_pezpallet_prefix::<Session>("Session");
        assert_pezpallet_prefix::<Aura>("Aura");
        assert_pezpallet_prefix::<AuraExt>("AuraExt");
    }
}
