import { ComponentType } from 'react' import { ActionCategoryMaker, ImplementedAction } from './actions' import { IVotingModuleBase } from './clients' import { DaoInfoCard, StakingMode } from './components' import { DaoTabWithComponent } from './dao' export interface BaseProfileCardMemberInfoProps { maxGovernanceTokenDeposit: string | undefined // True if wallet cannot vote on a proposal being shown. cantVoteOnProposal?: boolean } export interface BaseStakingModalProps { visible: boolean onClose: () => void initialMode?: StakingMode maxDeposit?: string } export type VotingModuleRelevantAddress = { label: string address: string } export interface IVotingModuleAdapter { // Hooks hooks: { useMainDaoInfoCards: () => DaoInfoCard[] useVotingModuleRelevantAddresses: () => VotingModuleRelevantAddress[] } // Components components: { extraTabs?: (Omit & { labelI18nKey: string })[] ProfileCardMemberInfo: ComponentType MainDaoInfoCardsLoader: ComponentType StakingModal?: ComponentType } // Fields fields: { actions?: { actions?: ImplementedAction[] categoryMakers: ActionCategoryMaker[] } } } export type VotingModuleAdapter = { id: string contractNames: string[] load: (votingModule: IVotingModuleBase) => IVotingModuleAdapter } export type IVotingModuleAdapterContext = { id: string adapter: IVotingModuleAdapter votingModule: IVotingModuleBase }