import type { ComponentProps } from 'react';
import { ButtonProps } from '@mui/material';
import Dialog from '../Dialog';

export type Org = {
  id: string;
  name: string;
  description?: string;
  ownerDid: string;
  metadata?: Record<string, any>;
};

type DialogProps = ComponentProps<typeof Dialog> & {
  placeholder?: string; // 搜索框的 placeholder
};

export type OrgTransferSelectorProps = Omit<OrgTransferProps, 'children' | 'buttonProps' | 'buttonText'> & {
  ref: React.RefObject<unknown | null>;
};

export interface OrgTransferProps {
  resourceId: string;
  onSuccess?: (org: Org) => void;
  org?: Org; // 当前所在的 Org
  children?: React.ReactNode;
  buttonProps?: ButtonProps;
  buttonText?: string;
  dialogProps?: DialogProps;
  locale?: string;
  [key: string]: any;
}
