/*!
 * 
 * TrustMeUp
 * 
 * @author 
 * @version 0.1.0
 * @link UNLICENSED
 * @license UNLICENSED
 * 
 * Copyright (c) 2023 
 * 
 * This software is released under the UNLICENSED License
 * https://opensource.org/licenses/UNLICENSED
 * 
 * Compiled with the help of https://wpack.io
 * A zero setup Webpack Bundler Script for WordPress
 */
(window.wpackioTrustMeUpadmin_jsJsonp=window.wpackioTrustMeUpadmin_jsJsonp||[]).push([[0],{107:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),c=n(15),o=n(9),s=n(4),i=n(13),l=n(14);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p={fields:d({},window.TrustMeUp.data.fields),isLoading:!1,notice:{message:null,success:!1,error:!1,warning:!1},updateField:function(){},setLoading:function(){},displayNotice:function(){}},m=Object(a.createContext)(p),f=function(e){var t=e.children,n=Object(a.useState)(p.fields),c=Object(i.a)(n,2),o=c[0],s=c[1],u=Object(a.useState)(p.isLoading),f=Object(i.a)(u,2),b=f[0],h=f[1],v=Object(a.useState)(p.notice),g=Object(i.a)(v,2),w=g[0],E=g[1],_=function(){E((function(e){return p.notice}))};return Object(a.useEffect)((function(){var e=setTimeout(_,7e3);return function(){clearTimeout(e)}}),[w.message]),r.a.createElement(m.Provider,{value:{fields:o,isLoading:b,notice:w,updateField:function(e,t){s((function(n){return d(d({},n),{},Object(l.a)({},e,t))}))},setLoading:h,displayNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success";E((function(n){return d(d({},p.notice),{},Object(l.a)({message:e},t,!0))}))},hideNotice:_}},t)},b=function(){return Object(a.useContext)(m)},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t&&(e="".concat(t,".").concat(e)),window.TrustMeUp.strings[e]?window.TrustMeUp.strings[e]:""},v=function(){var e=b(),t=e.notice,n=e.hideNotice;if(!t.message)return null;var a="success";return t.error&&(a="error"),t.warning&&(a="warning"),r.a.createElement(s.j,{className:"feedback-notice",status:a,onDismiss:n},t.message)},g=Object(o.hot)((function(){return r.a.createElement("header",{className:"settings-page-header"},r.a.createElement("h1",{className:"wp-heading-inline"},h("Global.PageTitle")),r.a.createElement(v,null))})),w=Object(o.hot)((function(){return b().isLoading?r.a.createElement("div",{className:"loader"},r.a.createElement(s.k,{size:"large",label:"Loading..."})):null})),E=n(6),_=n.n(E),O=n(10),j=Object(o.hot)((function(e){var t=e.title,n=e.subtitle,a=e.transparent,c=void 0!==a&&a,o=e.edgy,i=void 0!==o&&o,l=e.children,u=e.className,d=void 0!==u&&u;return r.a.createElement(s.i,{className:"section".concat(d?" ".concat(d):"").concat(c?" transparent":"").concat(i?" edgy":"")},t&&r.a.createElement(s.i.Header,null,t),n&&r.a.createElement(s.i.SubHeader,null,n),r.a.createElement(s.i.Section,{className:"section-children"},l))})),x=n(55),y=n(5),N=Object(o.hot)((function(e){var t=e.selectProduct,n=e.selectAllAvailableProducts,c=e.selection,o=b().fields,l=Object(a.useState)(""),u=Object(i.a)(l,2),d=u[0],p=u[1],m=Object(a.useState)([]),f=Object(i.a)(m,2),v=f[0],g=f[1],w=Object(a.useState)(""),E=Object(i.a)(w,2),_=E[0],O=E[1];return Object(a.useEffect)((function(){g(window.TrustMeUp.data.fields.woo_products.filter((function(e){return""===d&&""===_||(""===_&&""!==d?e.name.toLowerCase().includes(d.toLowerCase()):""===d&&""!==_?(console.log(e.categories.map((function(e){return e.toLowerCase()}))),e.categories.map((function(e){return e.toLowerCase()})).includes(_.toLowerCase())):void 0)})))}),[,d,_]),r.a.createElement("div",{id:"search-widget-container"},r.a.createElement("div",{className:"instructions"},r.a.createElement("p",null,h("Text.ConnectorPopupMultipleDesc")),r.a.createElement(s.b,{size:"small",mt:"400",variant:"outline",onClick:n},h("Button.SelectAllAvailable")),r.a.createElement("ul",{className:"products-legend"},r.a.createElement("li",{className:"title"},h("Text.Legend")),r.a.createElement("li",{className:"legend-item already-connected"},h("Text.LegendAlreadyConnected")),r.a.createElement("li",{className:"legend-item connected-with-other"},h("Text.LegendConnectedWithOther")),r.a.createElement("li",{className:"legend-item available"},h("Text.LegendAvailable")))),r.a.createElement("div",{className:"widget"},r.a.createElement("div",{className:"search-section"},r.a.createElement(s.n,{id:"categorieSearch",label:null,placeholder:h("Field.CategoriesProducts"),name:"categorieSearch",value:_,prefix:r.a.createElement(y.x,{size:24}),suffix:""!==_&&r.a.createElement("span",{className:"search-stats"},v.length," /"," ",window.TrustMeUp.data.fields.woo_products.length),onChange:function(e){return p(""),O(e.target.value)}})),r.a.createElement("div",{className:"search-section"},r.a.createElement(s.n,{id:"search",label:null,placeholder:h("Field.SearchProducts"),name:"search",value:d,prefix:r.a.createElement(y.x,{size:24}),suffix:""!==d&&r.a.createElement("span",{className:"search-stats"},v.length," /"," ",window.TrustMeUp.data.fields.woo_products.length),onChange:function(e){return O(""),p(e.target.value)}})),0===window.TrustMeUp.data.fields.woo_products.length&&r.a.createElement("p",null,h("Text.NoWooProducts")),""!==d&&0===v.length&&r.a.createElement("p",null,h("Text.NoWooProductsAfterFilter")),v.length>0&&r.a.createElement("ul",{className:"woo-products"},v.map((function(e,n){var a=c.includes(e.id),s=!a&&o.connected_woo_products_ids.includes(e.id),i=null;if(a||s){var l=o.connected_products.find((function(t){return t.synced_with.map((function(e){return e.id})).includes(e.id)}));l&&(i=l.discount)}return r.a.createElement("li",{key:"wooProduct".concat(e.id),onClick:function(){return t(e.id)},className:"".concat(a?"selected":""," ").concat(s?"selected-elsewhere":"")},r.a.createElement("img",{src:e.thumbnail,alt:e.name}),r.a.createElement("h6",null,e.name),i&&r.a.createElement("span",{className:"discount"},i,"%"))})))))})),C=n(54),k=n.n(C);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=function(){var e=Object(O.a)(_.a.mark((function e(t){var n,a=arguments;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.abrupt("return",k.a.post("".concat(window.TrustMeUp.data.api.rest_url,"trustmeup/v1/admin/").concat(t),n,{headers:{"Content-Type":"application/json","X-WP-Nonce":window.TrustMeUp.data.api.nonce},timeout:6e4}).then((function(e){return Promise.resolve(e.data)}),(function(e){return Promise.reject(e)})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=Object(O.a)(_.a.mark((function e(t){var n,a,r=arguments;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},e.prev=1,e.next=4,S(t,n);case 4:return a=e.sent,e.abrupt("return",T({success:!0},a));case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{error:e.t0.message});case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=Object(O.a)(_.a.mark((function e(){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D("products-refresh");case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){var e=Object(O.a)(_.a.mark((function e(){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D("products-resync");case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(){var e=Object(O.a)(_.a.mark((function e(){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D("products-disconnect");case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=Object(O.a)(_.a.mark((function e(t){var n,a=arguments;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:[],e.next=3,D("products-connect",{trustmeup_product:t,woo_products:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=Object(O.a)(_.a.mark((function e(t){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D("products-disconnect",{product:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=Object(O.a)(_.a.mark((function e(t){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D("fields-save",{fields:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),U=Object(o.hot)((function(e){var t=e.search,n=b(),c=n.fields,o=n.isLoading,l=n.setLoading,u=n.displayNotice,d=n.updateField,p=Object(s.p)(),m=p.getActivatorProps,f=p.getModalProps,v=Object(a.useState)(null),g=Object(i.a)(v,2),w=g[0],E=g[1],j=Object(a.useState)([]),C=Object(i.a)(j,2),k=C[0],P=C[1];Object(a.useEffect)((function(){P(w?w.synced_with.map((function(e){return e.id})):[])}),[w]);var T=function(){var e=Object(O.a)(_.a.mark((function e(){var t;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f().onClose(),l(!0),e.next=4,z(w.id,k);case 4:(t=e.sent).message&&u(t.message||t.error,t.success?"success":"error"),t.fields&&t.fields.connected_products&&d("connected_products",t.fields.connected_products),E(null),l(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=Object(O.a)(_.a.mark((function e(t){var n;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),e.next=3,I(t);case 3:(n=e.sent).message&&u(n.message||n.error,n.success?"success":"error"),n.fields&&n.fields.connected_products&&d("connected_products",n.fields.connected_products),l(!1);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return r.a.createElement("div",null,r.a.createElement(s.l,{className:"connected-products-table"},r.a.createElement("thead",null,r.a.createElement(s.l.Row,{header:!0},r.a.createElement(s.l.HeaderCell,{className:"col-name"},h("Text.TrustMeUpProduct")),r.a.createElement(s.l.HeaderCell,{className:"col-connections"},h("Text.WooProduct")))),r.a.createElement("tbody",null,0===c.connected_products.length&&r.a.createElement(s.l.Row,null,r.a.createElement(s.l.Cell,{colSpan:"2"},r.a.createElement("p",{className:"empty-table-message"},h("Text.NoConnectedProducts")))),c.connected_products.filter((function(e){return""===t||e.synced_with.map((function(e){return e.name.toLowerCase()})).filter((function(e){return e.includes(t)})).length>0})).map((function(e,t){return r.a.createElement(s.l.Row,{key:"pendingProductRow".concat(t)},r.a.createElement(s.l.Cell,{className:"col-name"},r.a.createElement("h6",null,r.a.createElement("span",{className:"product-name-text"},e.name)),r.a.createElement("ul",{className:"meta"},r.a.createElement("li",null,r.a.createElement("span",{className:"discount"},e.discount," %")),e.synced_with.length>0&&r.a.createElement("li",null,r.a.createElement("span",{className:"single-disconnect link",onClick:function(){window.confirm("".concat(h("Button.Disconnect")," ").concat(e.name,"?"))&&S(e.id)}},r.a.createElement(y.s,{size:"18",className:"icon"})," ",h("Button.Disconnect"))))),r.a.createElement(s.l.Cell,{className:"col-connections"},e.synced_with.length>0&&r.a.createElement("ul",{className:"woo-products"},e.synced_with.map((function(t){return r.a.createElement("li",{key:"connectedProduct_".concat(e.id,"_").concat(t.id)},r.a.createElement("a",{href:t.permalink,target:"_blank"},r.a.createElement("h6",null,t.name)))}))),0===e.synced_with.length?r.a.createElement(s.b,{size:"default",disabled:o,color:"blue",className:"connect-button-popup-opener connect",variant:"mutedOutline",onClick:function(){E(e),m().onClick()}},r.a.createElement(s.b.Icon,{as:y.a,size:20,mr:8}),r.a.createElement("span",null,h("Button.ConnectProducts"))):r.a.createElement("a",{href:"#",className:"link connect-button-popup-opener edit",onClick:function(t){t.preventDefault(),E(e),m().onClick()}},r.a.createElement(s.b.Icon,{as:y.l,size:16,mr:4}),r.a.createElement("span",null,h("Button.EditConnectedProducts")))))})))),w&&r.a.createElement(s.h,Object.assign({},f(),{onClose:function(){f().onClose()},id:"connector-popup",maxWidth:"60%"}),r.a.createElement(s.h.Header,{showCloseButton:!0},h("Text.ConnectorPopupTitle")," ",r.a.createElement("br",null),r.a.createElement("small",null,w.name," — ",w.discount," %")),r.a.createElement(s.h.Content,null,r.a.createElement(N,{selectProduct:function(e){var t;t=k.includes(e)?k.filter((function(t){return t!==e})):[].concat(Object(x.a)(k),[e]),P((function(){return t}))},selectAllAvailableProducts:function(){P(window.TrustMeUp.data.fields.woo_products.filter((function(e){return!c.connected_woo_products_ids.includes(e.id)||k.includes(e.id)})).map((function(e){return e.id})))},selection:k}),r.a.createElement("div",{className:"modal-footer"},r.a.createElement(s.b,{className:"cancel-button",variant:"text",color:"red",mr:20,onClick:function(){f().onClose(),E(null),P([])}},h("Button.Cancel")),r.a.createElement(s.b,{className:"connect-button",onClick:T,disabled:0===k.length},h("Button.Save"))))))})),B=Object(o.hot)((function(){var e=b(),t=e.fields,n=e.updateField,c=e.isLoading,o=e.setLoading,l=e.displayNotice,u=Object(a.useState)(""),d=Object(i.a)(u,2),p=d[0],m=d[1];Object(a.useEffect)((function(){v()}),[]),Object(a.useEffect)((function(){n("connected_woo_products_ids",t.connected_products.map((function(e){return e.synced_with.map((function(e){return e.id})).flat()})).flat())}),[t.connected_products]);var f=function(){var e=Object(O.a)(_.a.mark((function e(){var t,a,r=arguments;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=r.length>0&&void 0!==r[0]?r[0]:null)&&t.preventDefault(),o(!0),e.next=5,F();case 5:(a=e.sent).message&&l(a.message||a.error,a.success?"success":"error"),a.fields&&a.fields.connected_products&&n("connected_products",a.fields.connected_products),o(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=function(){var e=Object(O.a)(_.a.mark((function e(){var t,a,r=arguments;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=r.length>0&&void 0!==r[0]?r[0]:null)&&t.preventDefault(),o(!0),e.next=5,L();case 5:(a=e.sent).message&&l(a.message||a.error,a.success?"success":"error"),a.fields&&a.fields.connected_products&&n("connected_products",a.fields.connected_products),o(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=function(){var e=Object(O.a)(_.a.mark((function e(t){var a;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),o(!0),e.next=4,M();case 4:(a=e.sent).message&&l(a.message||a.error,a.success?"success":"error"),a.fields&&a.fields.connected_products&&n("connected_products",a.fields.connected_products),o(!1);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return function(e){return""!==e.api_client_id&&""!==e.api_password||""!==e.api_client_id_beta&&""!==e.api_password_beta}(t)?r.a.createElement(r.a.Fragment,null,r.a.createElement("nav",{className:"actions-bar"},r.a.createElement(s.g,{align:"right"},t.connected_products.length>0&&t.connected_products.filter((function(e){return e.synced_with.length>0})).length>0&&r.a.createElement(s.b,{size:"small",variant:"text",color:"red",disabled:c,className:"action-right",onClick:function(e){return window.confirm(h("Button.DisconnectAll?"))&&g(e)}},r.a.createElement(s.b.Icon,{as:y.s,size:20,mr:"200"}),h("Text.DisconnectAllProducts")),r.a.createElement(s.b,{size:"small",variant:"text",disabled:c,onClick:f},r.a.createElement(s.b.Icon,{as:y.k,size:20,mr:"200"}),h("Button.SyncWithTMU")))),r.a.createElement(j,{className:"connected-products",edgy:!0,title:h("Text.ConnectedProducts")},r.a.createElement("div",{className:"search-section action-right"},r.a.createElement(s.n,{id:"search",label:null,placeholder:h("Field.SearchProducts"),name:"search",value:p,prefix:r.a.createElement(y.x,{size:24}),onChange:function(e){m(e.target.value)}})),r.a.createElement(U,{search:p}))):r.a.createElement(j,null,r.a.createElement(s.a,{size:"small",status:"warning",onDismiss:function(){}},h("Text.CredentialsMissing")))})),H=(Object(o.hot)((function(e){return r.a.createElement(s.d,{dark:!0,code:JSON.stringify(e,void 0,2)})})),Object(o.hot)((function(){var e=b(),t=e.fields,n=e.updateField,a=e.setLoading,c=e.displayNotice,o=function(){var e=Object(O.a)(_.a.mark((function e(r){var o;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),a(!0),o=null,"prod"!==t.api_environment){e.next=9;break}return e.next=6,A({api_environment:"prod",api_client_id:t.api_client_id,api_password:t.api_password});case 6:o=e.sent,e.next=13;break;case 9:if("beta"!==t.api_environment){e.next=13;break}return e.next=12,A({api_environment:"beta",api_client_id_beta:t.api_client_id_beta,api_password_beta:t.api_password_beta});case 12:o=e.sent;case 13:c(o.message||o.error,o.success?"success":"error"),o.fields&&void 0!==o.fields.merchant_token&&n("merchant_token",o.fields.merchant_token),a(!1);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return r.a.createElement(r.a.Fragment,null,r.a.createElement(j,{title:h("Text.ApiCredentials")},r.a.createElement(s.c,{id:"api_environment",name:"api_environment",checked:"beta"===t.api_environment,label:h("Field.EnvironmentCheckbox"),onChange:function(e){var t=e.target.checked?"beta":"prod";n("api_environment",t),n("merchant_token",null)}}),"prod"===t.api_environment?r.a.createElement("p",{className:"section-intro",dangerouslySetInnerHTML:{__html:h("Text.TextBeforeAPICreds")}}):r.a.createElement("p",{className:"section-intro",dangerouslySetInnerHTML:{__html:h("Text.TextBeforeAPICredsBeta")}}),r.a.createElement(s.f,null,"prod"===t.api_environment?r.a.createElement(r.a.Fragment,null,r.a.createElement(s.e,{width:.4},r.a.createElement(s.n,{id:"api_client_id",label:h("Field.ClientID"),placeholder:h("Field.ClientID"),name:"api_client_id",value:t.api_client_id,onChange:function(e){n(e.target.name,e.target.value)}})),r.a.createElement(s.e,{width:.4},r.a.createElement(s.n,{id:"api_password",label:h("Field.Password"),placeholder:h("Field.Password"),name:"api_password",value:t.api_password,onChange:function(e){n(e.target.name,e.target.value)}}))):r.a.createElement(r.a.Fragment,null,r.a.createElement(s.e,{width:.4},r.a.createElement(s.n,{id:"api_client_id_beta",label:"".concat(h("Field.ClientID")," (beta)"),placeholder:"".concat(h("Field.ClientID")," (beta)"),name:"api_client_id_beta",value:t.api_client_id_beta,onChange:function(e){n(e.target.name,e.target.value)}})),r.a.createElement(s.e,{width:.4},r.a.createElement(s.n,{id:"api_password_beta",label:"".concat(h("Field.Password")," (beta)"),placeholder:"".concat(h("Field.Password")," (beta)"),name:"api_password_beta",value:t.api_password_beta,onChange:function(e){n(e.target.name,e.target.value)}}))),r.a.createElement(s.e,{className:"align-bottom"},r.a.createElement(s.b,{size:"default",width:"100%",variant:"outline",color:"blue",disabled:"prod"===t.api_environment&&(""===t.api_client_id||""===t.api_password)||"beta"===t.api_environment&&(""===t.api_client_id_beta||""===t.api_password_beta),onClick:o,mutedOutline:!0},h("Button.Save")))),t.merchant_token?r.a.createElement(s.a,{mt:"300",size:"small",status:"info",onDismiss:function(){}},h("Settings.ValidMerchantTokenIs")," ",r.a.createElement("code",null,t.merchant_token)):r.a.createElement(s.a,{mt:"300",size:"small",status:"warning",onDismiss:function(){}},h("Settings.InvalidMerchantToken"))))}))),W=[{title:h("Tabs.Overview"),component:B,slug:"overview"},{title:h("Tabs.Settings"),component:H,slug:"settings"}],R=W.findIndex((function(e){return e.slug===window.TrustMeUp.data.current_tab}))||0,q=Object(o.hot)((function(){var e=b().hideNotice,t=Object(s.q)({tabs:W.map((function(e){return{content:e.title}}))}),n=t.tabIndex,c=t.setTabIndex,o=t.tabs;Object(a.useEffect)((function(){c(R)}),[]);return r.a.createElement(r.a.Fragment,null,r.a.createElement("nav",{className:"plugin-tabs"},r.a.createElement(s.m,{selected:n,tabs:o,onSelect:function(t){c(t),e()},fitted:!0})),W.map((function(e,t){if(t!==n)return null;var a=e.component;return r.a.createElement("div",{className:"tab-content",key:"tabContent".concat(t)},r.a.createElement(a,null),r.a.createElement(w,null))})))})),J=Object(o.hot)((function(){return r.a.createElement(s.o,null,r.a.createElement(f,null,r.a.createElement("div",{className:"wrap"},r.a.createElement(g,null),r.a.createElement("div",{className:"admin-page-core-content"},r.a.createElement(q,null)))))}));if(document.querySelector("#tmu-admin-page-container")){document.addEventListener("DOMContentLoaded",(function(){Object(c.render)(r.a.createElement(J,null),document.querySelector("#tmu-admin-page-container"))}))}},58:function(e,t,n){n(59),e.exports=n(107)}},[[58,1,2]]]);
//# sourceMappingURL=admin-6b68c6c6.js.map