{"ast":null,"code":"\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport useClosable, { pickClosable } from '../_util/hooks/useClosable';\nimport { ConfigContext } from '../config-provider';\nimport Skeleton from '../skeleton';\nconst DrawerPanel = props => {\n var _a, _b;\n const {\n prefixCls,\n title,\n footer,\n extra,\n loading,\n onClose,\n headerStyle,\n bodyStyle,\n footerStyle,\n children,\n classNames: drawerClassNames,\n styles: drawerStyles\n } = props;\n const {\n drawer: drawerContext\n } = React.useContext(ConfigContext);\n const customCloseIconRender = React.useCallback(icon => ( /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n onClick: onClose,\n \"aria-label\": \"Close\",\n className: `${prefixCls}-close`\n }, icon)), [onClose]);\n const [mergedClosable, mergedCloseIcon] = useClosable(pickClosable(props), pickClosable(drawerContext), {\n closable: true,\n closeIconRender: customCloseIconRender\n });\n const headerNode = React.useMemo(() => {\n var _a, _b;\n if (!title && !mergedClosable) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n style: Object.assign(Object.assign(Object.assign({}, (_a = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.styles) === null || _a === void 0 ? void 0 : _a.header), headerStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.header),\n className: classNames(`${prefixCls}-header`, {\n [`${prefixCls}-header-close-only`]: mergedClosable && !title && !extra\n }, (_b = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.classNames) === null || _b === void 0 ? void 0 : _b.header, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.header)\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-header-title`\n }, mergedCloseIcon, title && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-title`\n }, title)), extra && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-extra`\n }, extra));\n }, [mergedClosable, mergedCloseIcon, extra, headerStyle, prefixCls, title]);\n const footerNode = React.useMemo(() => {\n var _a, _b;\n if (!footer) {\n return null;\n }\n const footerClassName = `${prefixCls}-footer`;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(footerClassName, (_a = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.classNames) === null || _a === void 0 ? void 0 : _a.footer, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.footer),\n style: Object.assign(Object.assign(Object.assign({}, (_b = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.styles) === null || _b === void 0 ? void 0 : _b.footer), footerStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.footer)\n }, footer);\n }, [footer, footerStyle, prefixCls]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, headerNode, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(`${prefixCls}-body`, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.body, (_a = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.classNames) === null || _a === void 0 ? void 0 : _a.body),\n style: Object.assign(Object.assign(Object.assign({}, (_b = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.styles) === null || _b === void 0 ? void 0 : _b.body), bodyStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.body)\n }, loading ? ( /*#__PURE__*/React.createElement(Skeleton, {\n active: true,\n title: false,\n paragraph: {\n rows: 5\n },\n className: `${prefixCls}-body-skeleton`\n })) : children), footerNode);\n};\nexport default DrawerPanel;","map":{"version":3,"names":["React","classNames","useClosable","pickClosable","ConfigContext","Skeleton","DrawerPanel","props","_a","_b","prefixCls","title","footer","extra","loading","onClose","headerStyle","bodyStyle","footerStyle","children","drawerClassNames","styles","drawerStyles","drawer","drawerContext","useContext","customCloseIconRender","useCallback","icon","createElement","type","onClick","className","mergedClosable","mergedCloseIcon","closable","closeIconRender","headerNode","useMemo","style","Object","assign","header","footerNode","footerClassName","Fragment","body","active","paragraph","rows"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/drawer/DrawerPanel.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport useClosable, { pickClosable } from '../_util/hooks/useClosable';\nimport { ConfigContext } from '../config-provider';\nimport Skeleton from '../skeleton';\nconst DrawerPanel = props => {\n var _a, _b;\n const {\n prefixCls,\n title,\n footer,\n extra,\n loading,\n onClose,\n headerStyle,\n bodyStyle,\n footerStyle,\n children,\n classNames: drawerClassNames,\n styles: drawerStyles\n } = props;\n const {\n drawer: drawerContext\n } = React.useContext(ConfigContext);\n const customCloseIconRender = React.useCallback(icon => ( /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n onClick: onClose,\n \"aria-label\": \"Close\",\n className: `${prefixCls}-close`\n }, icon)), [onClose]);\n const [mergedClosable, mergedCloseIcon] = useClosable(pickClosable(props), pickClosable(drawerContext), {\n closable: true,\n closeIconRender: customCloseIconRender\n });\n const headerNode = React.useMemo(() => {\n var _a, _b;\n if (!title && !mergedClosable) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n style: Object.assign(Object.assign(Object.assign({}, (_a = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.styles) === null || _a === void 0 ? void 0 : _a.header), headerStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.header),\n className: classNames(`${prefixCls}-header`, {\n [`${prefixCls}-header-close-only`]: mergedClosable && !title && !extra\n }, (_b = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.classNames) === null || _b === void 0 ? void 0 : _b.header, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.header)\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-header-title`\n }, mergedCloseIcon, title && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-title`\n }, title)), extra && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-extra`\n }, extra));\n }, [mergedClosable, mergedCloseIcon, extra, headerStyle, prefixCls, title]);\n const footerNode = React.useMemo(() => {\n var _a, _b;\n if (!footer) {\n return null;\n }\n const footerClassName = `${prefixCls}-footer`;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(footerClassName, (_a = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.classNames) === null || _a === void 0 ? void 0 : _a.footer, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.footer),\n style: Object.assign(Object.assign(Object.assign({}, (_b = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.styles) === null || _b === void 0 ? void 0 : _b.footer), footerStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.footer)\n }, footer);\n }, [footer, footerStyle, prefixCls]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, headerNode, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(`${prefixCls}-body`, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.body, (_a = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.classNames) === null || _a === void 0 ? void 0 : _a.body),\n style: Object.assign(Object.assign(Object.assign({}, (_b = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.styles) === null || _b === void 0 ? void 0 : _b.body), bodyStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.body)\n }, loading ? ( /*#__PURE__*/React.createElement(Skeleton, {\n active: true,\n title: false,\n paragraph: {\n rows: 5\n },\n className: `${prefixCls}-body-skeleton`\n })) : children), footerNode);\n};\nexport default DrawerPanel;"],"mappings":"AAAA,YAAY;;AAEZ,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,WAAW,IAAIC,YAAY,QAAQ,4BAA4B;AACtE,SAASC,aAAa,QAAQ,oBAAoB;AAClD,OAAOC,QAAQ,MAAM,aAAa;AAClC,MAAMC,WAAW,GAAGC,KAAK,IAAI;EAC3B,IAAIC,EAAE,EAAEC,EAAE;EACV,MAAM;IACJC,SAAS;IAC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