import{b as d}from"./chunk-M4ZT2KGJ.mjs";import{LinkIcon as p,PenEditIcon as P,PinIcon as A}from"@baseapp-frontend/design-system/components/web/icons";import{jsx as s}from"react/jsx-runtime";function C(t,e){return h(t)||b(t,e)||v(t,e)||y()}function y(){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(t,e){if(t){if(typeof t=="string")return f(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}function f(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function b(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,m,r,l,a=[],o=!0,u=!1;try{if(r=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;o=!1}else for(;!(o=(i=r.call(n)).done)&&(a.push(i.value),a.length!==e);o=!0);}catch(c){u=!0,m=c}finally{try{if(!o&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw m}}return a}}function h(t){if(Array.isArray(t))return t}var k=function(e){var n=e.comment,i=e.onEdit,m=d(),r=C(m,2),l=r[0],a=r[1],o=function(){l({variables:{id:n.id}})},u=function(){i()};return[{disabled:!0,icon:s(p,{}),label:"Share Comment",onClick:function(){},hasPermission:!0,closeOnClick:!0},{disabled:a,icon:s(A,{sx:{color:n!=null&&n.isPinned?"info.main":"action.active"}}),label:"".concat(n!=null&&n.isPinned?"Unpin":"Pin"," Comment"),onClick:o,hasPermission:n?.canPin,closeOnClick:!0},{disabled:!1,icon:s(P,{}),label:"Edit Comment",onClick:u,hasPermission:n?.canChange,closeOnClick:!0}]},_=k;export{_ as a};
//# sourceMappingURL=chunk-3FC6O56G.mjs.map