import { YTButton, yTToast, } from '../../../../../Index';
import { BasicType } from '../../models';

@Builder
export function yTDoubleConfirm(item: BasicType<undefined>) {
  Column() {
    Text(item.text)
      .fontSize(14)
      .fontColor(Color.Black)
      .margin({ bottom: 18 })
    Text(item.message)
      .fontColor($r('sys.color.mask_secondary'))
      .lineHeight(18)
      .fontSize(13)
      .margin({ bottom: 18 })
    Row() {
      YTButton(
        {
          btContent: '确定',
          btWidth: 108,
          btHeight: 37,
          bgc:'#fd54e3',
          btFontSize: 12,
          click: item.click
        }
      )
      YTButton(
        {
          btContent: '取消',
          btWidth: 108,
          btHeight: 37,
          btFontColor: '#80000000',
          btBorder: { width: 1, color: '#33000000' },
          btFontSize: 12,
          bgc: Color.White,
          click: () => {
            yTToast.hide()
          }
        }
      )
    }
    .justifyContent(FlexAlign.SpaceBetween)
    .width('100%')
  }
  .height(160)
  .width(280)
  .padding({ top: 14, left: 24, right: 24 })
  .backgroundColor(Color.White)
  .borderRadius(8)
}