"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk2GSPCYGSjs = require('./chunk-2GSPCYGS.js');var _chunkUBRUS4CKjs = require('./chunk-UBRUS4CK.js');var _chunkX6JGAYTFjs = require('./chunk-X6JGAYTF.js');var _chunkC3IDIQ6Zjs = require('./chunk-C3IDIQ6Z.js');var _react = require('react');var _animate = require('@baseapp-frontend/design-system/components/web/animate');var _icons = require('@baseapp-frontend/design-system/components/web/icons');var _web = require('@baseapp-frontend/design-system/hooks/web');var _material = require('@mui/material');var _IconButton = require('@mui/material/IconButton'); var _IconButton2 = _interopRequireDefault(_IconButton);var _framermotion = require('framer-motion');var _reactrelay = require('react-relay');var _jsxruntime = require('react/jsx-runtime');function p(o){"@babel/helpers - typeof";return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},p(o)}var U=["onClose"];function S(o,r){var e=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),e.push.apply(e,t)}return e}function l(o){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?S(Object(e),!0).forEach(function(t){W(o,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(e)):S(Object(e)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(e,t))})}return o}function W(o,r,e){return(r=z(r))in o?Object.defineProperty(o,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):o[r]=e,o}function z(o){var r=K(o,"string");return p(r)=="symbol"?r:r+""}function K(o,r){if(p(o)!="object"||!o)return o;var e=o[Symbol.toPrimitive];if(e!==void 0){var t=e.call(o,r||"default");if(p(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(o)}function R(o,r){if(o==null)return{};var e,t,i=q(o,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);for(t=0;t<n.length;t++)e=n[t],r.indexOf(e)===-1&&{}.propertyIsEnumerable.call(o,e)&&(i[e]=o[e])}return i}function q(o,r){if(o==null)return{};var e={};for(var t in o)if({}.hasOwnProperty.call(o,t)){if(r.indexOf(t)!==-1)continue;e[t]=o[t]}return e}function G(o,r){return Y(o)||X(o,r)||V(o,r)||J()}function J(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V(o,r){if(o){if(typeof o=="string")return _(o,r);var e={}.toString.call(o).slice(8,-1);return e==="Object"&&o.constructor&&(e=o.constructor.name),e==="Map"||e==="Set"?Array.from(o):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?_(o,r):void 0}}function _(o,r){(r==null||r>o.length)&&(r=o.length);for(var e=0,t=Array(r);e<r;e++)t[e]=o[e];return t}function X(o,r){var e=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(e!=null){var t,i,n,c,f=[],s=!0,d=!1;try{if(n=(e=e.call(o)).next,r===0){if(Object(e)!==e)return;s=!1}else for(;!(s=(t=n.call(e)).done)&&(f.push(t.value),f.length!==r);s=!0);}catch(m){d=!0,i=m}finally{try{if(!s&&e.return!=null&&(c=e.return(),Object(c)!==c))return}finally{if(d)throw i}}return f}}function Y(o){if(Array.isArray(o))return o}var uo=function(r){var e=r.Drawer,t=e===void 0?_material.Drawer:e,i=r.DrawerProps,n=i===void 0?{}:i,c=r.Badge,f=c===void 0?_material.Badge:c,s=r.BadgeProps,d=s===void 0?{}:s,m=r.NotificationBellIcon,I=m===void 0?_icons.NotificationBellIcon:m,b=r.NotificationBellIconProps,L=b===void 0?{}:b,P=r.NotificationsList,x=P===void 0?_chunk2GSPCYGSjs.a:P,g=r.NotificationsListProps,$=g===void 0?{}:g,A=_react.useState.call(void 0, !1),h=G(A,2),C=h[0],y=h[1],T=_reactrelay.useLazyLoadQuery.call(void 0, _chunkX6JGAYTFjs.a,{},{fetchPolicy:"store-and-network"}),k=T.me,u=_reactrelay.useFragment.call(void 0, _chunkUBRUS4CKjs.a,k);_chunkC3IDIQ6Zjs.a.call(void 0, _optionalChain([u, 'optionalAccess', _2 => _2.id]));var E=_web.useResponsive.call(void 0, "down","sm"),v=n.onClose,F=R(n,U);return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _IconButton2.default,{component:_framermotion.m.button,whileTap:"tap",whileHover:"hover",variants:_animate.varHover.call(void 0, 1.05),onClick:function(){return y(!0)},"aria-label":"see notifications",children:_jsxruntime.jsx.call(void 0, f,l(l({badgeContent:_optionalChain([u, 'optionalAccess', _3 => _3.notificationsUnreadCount]),color:"error"},d),{},{children:_jsxruntime.jsx.call(void 0, I,l({color:"secondary"},L))}))}),_jsxruntime.jsx.call(void 0, t,l(l({anchor:E?"bottom":"right",open:C,onClose:function(M,Q){y(!1),_optionalChain([v, 'optionalCall', _4 => _4(M,Q)])},sx:{"& .MuiDrawer-paper":{height:"100vh"}},PaperProps:{sx:{width:{xs:"100%",sm:390,md:420}}}},F),{},{children:_jsxruntime.jsx.call(void 0, x,l({setIsDrawerOpened:y},$))}))]})},fo=function(r){var e=r.NotificationBellIcon,t=e===void 0?_icons.NotificationBellIcon:e,i=r.NotificationBellIconProps,n=i===void 0?{}:i;return _jsxruntime.jsx.call(void 0, _react.Suspense,{fallback:_jsxruntime.jsx.call(void 0, _IconButton2.default,{disabled:!0,children:_jsxruntime.jsx.call(void 0, t,l({color:"secondary"},n))}),children:_jsxruntime.jsx.call(void 0, uo,l({},r))})},jo= exports.a =fo;exports.a = jo;
//# sourceMappingURL=chunk-EXPLYECG.js.map