(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{1165:function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(17),c=n(784),i=n(15),o=n(4),u=n(2),l=n(859),s=n(796),m=n(38);function b(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=[],r=!0,a=!1,c=void 0;try{for(var i,o=e[Symbol.iterator]();!(r=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==o.return||o.return()}finally{if(a)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(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 p(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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=Object(r.lazy)((function(){return n.e(76).then(n.bind(null,1127))})),d=Object(r.lazy)((function(){return Promise.all([n.e(0),n.e(66)]).then(n.bind(null,1138))})),y=Object(r.lazy)((function(){return n.e(48).then(n.bind(null,1139))})),g=Object(r.lazy)((function(){return n.e(65).then(n.bind(null,1130))}));t.default=function(e){var t=location&&location.search?Object(a.parse)(location.search.substring(1)):{},n=e.campaignId,p=s.a.getCampaignData(),h=p.hasOwnProperty("type")?parseInt(p.type):1,j=Object(l.a)().data,O=j||{},v=O.reached,w=void 0!==v&&v,E=O.daily_limit,_=void 0===E?0:E,k=b(Object(r.useState)(!0),2),x=k[0],S=k[1];return Object(r.createElement)(r.Fragment,null,"1"===p.type&&!!w&&!!x&&Object(r.createElement)(o.Notice,{className:"bwf-error-notice",status:"warning",onRemove:function(){return S(!1)}},"".concat(Object(u.__)("Daily sending limit of","wp-marketing-automations")," ").concat(_," ").concat(Object(u.__)(" emails has been reached today. To send out more emails, go to ","wp-marketing-automations")," "),Object(r.createElement)(m.a,{href:"admin.php?page=autonami&path=/settings",className:"bwf-a-no-underline"},Object(u.__)("Settings > Emails","wp-marketing-automations")),Object(u.__)(" to increase the limit.","wp-marketing-automations")),Object(r.createElement)(c.b,{history:Object(i.d)()},Object(r.createElement)(r.Suspense,{fallback:Object(r.createElement)(r.Fragment,null)},Object(r.createElement)(c.c,null,Object(r.createElement)(c.a,{exact:!0,path:["/broadcast/".concat(n,"/overview"),"/broadcast/".concat(n)],render:function(){return Object(r.createElement)(d,{campaignType:h})}}),Object(r.createElement)(c.a,{exact:!0,path:"/broadcast/".concat(n,"/analytics"),render:function(){return Object(r.createElement)(f,{query:t,campaignId:n,campaignType:h})}}),Object(r.createElement)(c.a,{exact:!0,path:"/broadcast/".concat(n,"/engagements"),render:function(){return Object(r.createElement)(y,{campaignId:n,campaignType:h})}}),Object(r.createElement)(c.a,{exact:!0,path:"/broadcast/".concat(n,"/orders"),render:function(){return Object(r.createElement)(g,{campaignId:n,campaignType:h})}})))))}},859:function(e,t,n){"use strict";var r=n(10),a=n.n(r),c=n(5),i=n(794);function o(e,t,n,r,a,c,i){try{var o=e[c](i),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(r,a)}var u=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a()({path:Object(c.m)("/messages/daily-limit")});case 2:if((t=e.sent)&&t.result&&200==t.code){e.next=5;break}throw Error(__("Unable to get daily limit","wp-marketing-automations"));case 5:return e.abrupt("return",t.result);case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){o(c,r,a,i,u,"next",e)}function u(e){o(c,r,a,i,u,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();t.a=function(){return Object(i.a)(["bwfcrm-get-daily-limit"],u,{retry:!1})}}}]);