(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{1160:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n(3),c=n(2),i=n(5),o=n(92),l=n(4);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],a=!0,r=!1,c=void 0;try{for(var i,o=e[Symbol.iterator]();!(a=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,c=e}finally{try{a||null==o.return||o.return()}finally{if(r)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}t.default=function(e){var t=s(Object(a.useState)(!1),2),n=t[0],m=t[1];return Object(a.createElement)("div",{className:"bwf-c-s-data"},Object(a.createElement)("div",{className:"bwf-c-s-section"},Object(a.createElement)(l.Button,{isPrimary:!0,className:"bwf-btn-small",onClick:function(){return m(!0)}},Object(c.__)("Add Note","wp-marketing-automations")),Object(a.createElement)("div",{className:"bwf_clear_30"}),Object(a.createElement)("div",{className:"bwf-notes-wrap"},[{id:1,created_date:"2021-02-03 12:34:01",title:"Note 1",private:1,body:"This is note body 1",created_username:"Admin"},{id:2,created_date:"2021-02-04 12:34:01",title:"Note 2",private:0,body:"This is note body 2",created_username:"Admin"}].map((function(e){var t,n,o,l,s=new Date(e.created_date);return Object(a.createElement)("div",{className:"bwf-note-item",key:e.id},Object(a.createElement)("div",{className:"bwf-note-text"},Object(a.createElement)("div",{className:"bwf-h4"},e.title,1==e.private&&Object(a.createElement)("div",{className:"bwf-note-highlight"},Object(c.__)("Sent to Contact","wp-marketing-automations"))),Object(a.createElement)("div",{className:"bwf-p"},e.body)),Object(a.createElement)("div",{className:"bwf-note-meta"},Object(a.createElement)("span",{className:"bwf-note-added"},!Object(r.isEmpty)(e.created_username)&&Object(a.createElement)(a.Fragment,null,"By"," ",Object(a.createElement)("span",null,e.created_username))," ","on"," ",Object(a.createElement)("span",null,Object(i.N)(e.created_date))," ","at"," ",Object(a.createElement)("span",null,(n=(t=s).getHours(),o=t.getMinutes(),l=n>=12?"PM":"AM",(n=(n%=12)||12)+":"+(o=o<10?"0"+o:o)+" "+l))),Object(a.createElement)("span",{className:"bwf-note-sep"},"|"),Object(a.createElement)("a",{href:"#",onClick:function(e){e.preventDefault(),m(!0)}},Object(c.__)("Edit","wp-marketing-automations")),Object(a.createElement)("span",{className:"bwf-note-sep"},"|"),Object(a.createElement)("a",{href:"#",className:"link-danger",onClick:function(e){e.preventDefault(),m(!0)}},Object(c.__)("Delete","wp-marketing-automations"))))})))),Object(a.createElement)(o.a,{isOpen:n,onRequestClose:function(){return m(!1)}}))}}}]);