{"version":3,"sources":["middlewares/ErrorListMw.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,4BAA4B,CAczE,CAAC;AAEF,eAAe,WAAW,CAAC","file":"ErrorListMw.d.ts","sourcesContent":["import * as React from 'react';\nimport { Callout, Intent } from '@blueprintjs/core';\nimport { BlueprintFormMiddlewareProps } from '../share';\n\nexport const ErrorListMw: React.ComponentType<BlueprintFormMiddlewareProps> = (props) => {\n  const { parent, next, errors } = props;\n  if (parent || !errors || !errors.length) return next(props);\n\n  return (\n    <>\n      {next(props)}\n      {errors.map((error, i) => (\n        <Callout key={i} intent={Intent.DANGER}>\n          {error.dataPath} {error.message}\n        </Callout>\n      ))}\n    </>\n  );\n};\n\nexport default ErrorListMw;\n"]}