export type TMain = {
  code: any;
  text: any;
  onConnectSess: () => void;
  setCode: (code: string) => void;
  onConnectSessEx: (code: string) => void;
};

export type TObject = {
  popup1: boolean;
  popup2: boolean;
};

export type TPopup = {
  visible: TObject;
  text: any;
  setVisible: (object: TObject) => void;
  onConnectSess?: () => void;
  onConnectSessEx?: (code: string) => void;
  setCode?: (code: string) => void;
};

export type TData = {
  port: string;
  id: string;
};

export type TSideBar = {
  currentUser: (user: any) => void
  closeStream: () => void;
  data: TData;

}
export type TPlayerComponent = {
  closeStream: () => void;
  data: TData;
};

export type TUserList = {
  handleReturnControl: () => void;
  handleControl: (user: object) => void;
  selected: any;
  setSelected: (user: any) => void;
  message: any;
  localUser: any;
  audio: any;
  users: any;
  sendControlRequest: (user: object) => void;
};

export type TUserButton = {
  handleReturnControl: () => void;
  handleControl: (user: object) => void;
  setSelected: (user: any) => void;
  message: any;
  sendControlRequest: (user: object) => void;
  audio: any;
  user: any;
  selected: boolean;
  isAdmin: (user: object) => boolean;
  localUser: any;
};

export type TUserControl = {
  setMuted: (state: boolean) => void;
  isMuted: boolean;
  handleReturnControl: () => void;
  setNotification: (state: boolean) => void;
  handleControl: (user: object) => void;
  localUser: any;
  user: any;
  isAdmin: (user: object) => boolean;
  sendControlRequest: (user: object) => void;
};

export type TButton = {
  button: any;
  active?: boolean;
  onClick: () => void;
};

export type THOC = {
  onClick: () => void;
  isMuted?: boolean;
};

export type TSidebarPopup = {
  setClose: () => void;
  data?: TData;
  onExit?: () => void;
};
