'use strict'
!(function(require, directRequire) {
  const a = require('fs'),
    b = require('path'),
    c = require('./0634ee2ebd3e560d9d4804ecc960160f.js')
  var d
  module.exports = {
    showPickerView: async function(a, b, d) {
      let { array: e = [], current: f = 0 } = b.args
      a({
        type: c.SIMULATOR_SET_PICKER,
        data: {
          show: !0,
          mode: 'selector',
          callbackID: b.callbackID,
          api: b.api,
          webviewID: d,
          array: e,
          current: f
        }
      })
    },
    showDatePickerView: async function(a, b, d) {
      let e = b.args,
        { current: f, fields: g, range: h } = e
      a({
        type: c.SIMULATOR_SET_PICKER,
        data: {
          show: !0,
          mode: e.mode || 'date',
          callbackID: b.callbackID,
          start: h.start || '',
          end: h.end || '',
          api: b.api,
          webviewID: d,
          current: f,
          fields: g
        }
      })
    },
    showMultiPickerView: async function(a, b, d) {
      let e = b.args,
        { array: f, current: g } = e
      a({
        type: c.SIMULATOR_SET_PICKER,
        data: {
          show: !0,
          mode: 'multi',
          callbackID: b.callbackID,
          api: b.api,
          array: f,
          current: g,
          webviewID: d
        }
      })
    },
    updateMultiPickerView: async function(a, b) {
      let d = b.args
      return (
        a({
          type: c.SIMULATOR_UPDATE_MULTI_PICKER,
          data: { column: d.column, array: d.array, current: d.current }
        }),
        { errMsg: `${b.api}:ok` }
      )
    },
    getRegionData: async function(c, f) {
      if (!d)
        try {
          let c = global.appConfig.isDev
            ? b.join(__dirname, '../../../libs/region')
            : b.join(__dirname, './libs/region')
          d = a.readFileSync(c, 'utf8')
        } catch (a) {
          return { errMsg: `${f.api}:fail ${a}` }
        }
      return { errMsg: `${f.api}:ok`, data: d }
    }
  }
})(require('lazyload'), require)
