type Props = {
  value: string
  label: string
  children: {
    value: string
    label: string
  }[]
}

type sonProps = {
  value: string
  label: string
}

const temp1: Props[] = []
const temp2: Props[] = []
const temp3: sonProps[] = []

myCityTemp.forEach(v => {
  const obj1 = {
    value: v.name,
    label: v.name,
    children: v.city.map(v2 => ({
      value: v2.name,
      label: v2.name,
      children: v2.districtAndCounty.map(v3 => ({
        value: v3,
        label: v3
      }))
    }))
  }

  const obj2 = {
    value: v.name,
    label: v.name,
    children: v.city.map(v2 => ({
      value: v2.name,
      label: v2.name
    }))
  }

  temp1.push(obj1)
  temp2.push(obj2)
})

temp2.forEach(item1 => {
  item1.children.forEach(item2 => {
    temp3.push({
      value: item1.value + '-' + item2.value,
      label: item1.label + '-' + item2.label
    })
  })
})

export const mapDataAll1 = temp1
export const mapDataAll2 = temp2
export const mapDataAll3 = temp3
