import { BasicType } from '../../models'

@Builder
export function reviseImgHeaderBuilder(items: BasicType<undefined>[]) {
  Column() {
    ForEach(items, (item: BasicType<undefined>, index) => {
      Text(item.text)
        .width('100%')
        .height(43)
        .textAlign(TextAlign.Center)
        .onClick(item.click)
      if (index < items.length - 1) {
        Text('')
          .width('100%')
          .height(index == items.length - 2 ? 6 : 1)
          .backgroundColor('#F8F8F8')
      }
    })
  }
  .height('100%')
  .padding({ top: 4 })
}