import { Modal } from '@arco-design/web-vue';

export async function modalConfirm(
  title: string,
  content: string
): Promise<string> {
  return new Promise((resolve, reject) => {
    Modal.confirm({
      title,
      content,
      escToClose: false,
      maskClosable: false,
      closable: false,
      titleAlign: 'start',
      onOk() {
        resolve('confirm');
      },
      onCancel() {
        reject();
      },
    });
  });
}

export const intFormatter = (value: string) => {
  return value.replace('.', '');
};
