"use strict";const r=require("../common/props.js"),e=require("../common/util.js"),o={...r.baseProps,loading:r.makeBooleanProp(!1),loadingColor:r.makeStringProp("#4D80F0"),columnsHeight:r.makeNumberProp(217),itemHeight:r.makeNumberProp(35),valueKey:r.makeStringProp("value"),labelKey:r.makeStringProp("label"),immediateChange:r.makeBooleanProp(!1),modelValue:{type:[String,Number,Boolean,Array,Array,Array],default:"",required:!0},columns:r.makeArrayProp(),columnChange:Function};exports.formatArray=function(r,o,a){let n=e.isArray(r)?r:[r];const t=new Set(r.map(e.getType));if(1!==t.size&&t.has("object"))throw Error("The columns are correct");return e.isArray(r[0])||(n=[n]),n.map((r=>r.map((r=>{if(!e.isObj(r))return{[o]:r,[a]:r};if(!r.hasOwnProperty(o)&&!r.hasOwnProperty(a))throw Error("Can't find valueKey and labelKey in columns");return r.hasOwnProperty(a)||(r[a]=r[o]),r.hasOwnProperty(o)||(r[o]=r[a]),r}))))},exports.pickerViewProps=o;
