(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{STORE_NAME:()=>E});var n={};t.r(n),t.d(n,{setIsFetching:()=>c,setIsSaving:()=>y,setSettings:()=>d,updateSettings:()=>S});var i={};t.r(i),t.d(i,{getSetting:()=>f,getSettings:()=>l,isFetchingSettings:()=>p,isSavingSettings:()=>v});var r={};t.r(r),t.d(r,{getSetting:()=>T,getSettings:()=>h});const s=window.wp.data,a="SET_SETTINGS",o="SET_IS_FETCHING",g="SET_IS_SAVING",u={settings:{},isFetching:!1,isSaving:!1};function d(t){return{type:a,settings:t}}function c(t){return{type:o,isFetching:t}}function y(t){return{type:g,isSaving:t}}function*S(t){yield y(!0);try{const e=yield{type:"API_FETCH",path:"/tryaura/v1/settings",method:"POST",data:t};return yield d(e),e}finally{yield y(!1)}}function l(t){return t.settings}function p(t){return t.isFetching}function v(t){return t.isSaving}function f(t,e,n=null){const i=l(t);return void 0!==i[e]?i[e]:n}function*h(){yield c(!0);try{const t=yield{type:"API_FETCH",path:"/tryaura/v1/settings"};yield d(t)}finally{yield c(!1)}}const T=h,_=window.wp.apiFetch;var w=t.n(_);const F={API_FETCH:t=>w()({path:t.path,method:t.method||"GET",data:t.data})},E="tryaura/settings",I=(0,s.createReduxStore)(E,{reducer:(t=u,e)=>{switch(e.type){case a:return{...t,settings:e.settings};case o:return{...t,isFetching:e.isFetching};case g:return{...t,isSaving:e.isSaving};default:return t}},actions:n,selectors:i,resolvers:r,controls:F});(0,s.register)(I),(window.tryaura=window.tryaura||{}).settingsStore=e})();