{"version":3,"sources":["middlewares/CheckboxMw.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC,eAAe,CAS3D,CAAC;AAEF,eAAe,UAAU,CAAC","file":"CheckboxMw.d.ts","sourcesContent":["import * as React from 'react';\nimport get from 'lodash/get';\nimport { Checkbox } from 'antd';\nimport { MiddlewareProps } from '../share';\n\nexport const CheckboxMw: React.ComponentType<MiddlewareProps> = (props) => {\n  const { schema, onChange, data, next, extraProps } = props;\n  if (typeof schema === 'boolean' || schema.type !== 'boolean') return next(props);\n\n  return (\n    <Checkbox checked={data} onChange={(e) => onChange(e.target.checked || undefined)} {...get(extraProps, 'props')}>\n      {schema.title}\n    </Checkbox>\n  );\n};\n\nexport default CheckboxMw;\n"]}