{"version":3,"file":"Delete.jsx","sourceRoot":"lib/","sources":["widgets/AuxToolWidget/Delete.tsx"],"names":[],"mappings":";;;AAAA,4CAA0C;AAC1C,qCAAqD;AACrD,sDAA8C;AAC9C,0EAA0E;AAC1E,qCAA0C;AAE1C,kCAAkC;AAClC,mBAAmB;AACnB,gCAAgC;AAChC,IAAI;AAEJ,IAAM,eAAe,GAAG,IAAA,0BAAe,EAAC;IACtC,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,KAAK,YAAC,KAAK;QACT,IAAM,YAAY,GAAG,IAAA,oBAAY,GAAE,CAAA;QACnC,IAAM,SAAS,GAAG,IAAA,iBAAS,EAAC,UAAU,CAAC,CAAA;QACvC,OAAO;YACL,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAA;YAC/C,OAAO,CACL,CAAC,qBAAM,CACL,KAAK,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CACvB,OAAO,CAAC,CAAC;oBACP,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBAC9C,CAAC,CAAC,CAEF;UAAA,CAAC,uBAAU,CAAC,KAAK,CAAC,QAAQ,EAC5B;QAAA,EAAE,qBAAM,CAAC,CACV,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AACW,QAAA,MAAM,GAAG,IAAA,2BAAa,EAAC,eAAe,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAA","sourcesContent":["import { IconWidget } from '../IconWidget'\nimport { useOperation, usePrefix } from '../../hooks'\nimport { Button } from '@gaoding/gd-antd-plus'\nimport { composeExport } from '@jeamn/formily-components/src/__builtins__'\nimport { defineComponent } from 'vue-demi'\n\n// export interface IDeleteProps {\n//   node: TreeNode\n//   style?: React.CSSProperties\n// }\n\nconst DeleteComponent = defineComponent({\n  props: ['node'],\n  setup(props) {\n    const operationRef = useOperation()\n    const prefixRef = usePrefix('aux-copy')\n    return () => {\n      if (props.node === props.node.root) return null\n      return (\n        <Button\n          class={prefixRef.value}\n          onClick={() => {\n            operationRef.value.removeNodes([props.node])\n          }}\n        >\n          <IconWidget infer=\"Remove\" />\n        </Button>\n      )\n    }\n  },\n})\nexport const Delete = composeExport(DeleteComponent, { displayName: 'Delete' })\n"]}