import WindowFloat from "./WindowFloat"; export default (props:{title:string, items:Array<{name:string|number, value:any, image?:string, icon?:string}> onhelp?:any, onclose?:any, on?:any, strvalue:string}) => { let btnbg = "#c9ceb1" let optstyle = { height: 35, width: "100%", margin: 2, borderRadius: 3, backgroundColor: btnbg } return { props.onclose?.(); }} onhelp={props.onhelp?(()=>{props.onhelp?.()}):null}> { props.items.map((item, i) => { let it = item; if(typeof it != "object") { it = {name:it, value:it} } let itp = props.items[i + 1]; if(itp && typeof itp != "object") { itp = {name:itp, value:itp} } let Img = null; if(item.image || item.icon) { Img = } if (i % 2 == 0) { return { props.on?.(it.name, it.value) }}> {Img}{(it.name).toLocaleString(lang.region)} {itp ? { props.on?.(itp.name,itp.value) }}> {Img}{(itp.name).toLocaleString(lang.region)} : null} } return null; }) } }