"use strict";(globalThis.webpackChunkbooktics=globalThis.webpackChunkbooktics||[]).push([[3788,6349,6759],{13788:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(51609),l=n(47143),s=n(9953),i=n(40309),r=n(22564),a=n(27723);const c=e=>{const{keys:t=[],children:n,title:c}=e,{isStripeConfigModalOpen:u,editLoading:b,setFields:d}=(0,l.useSelect)(e=>e(i.settings).getSettingsState(),[]),{setSettingsState:m}=(0,l.useDispatch)(i.settings);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(r.ConfigureBtn,{text:(0,a.__)("Configure","booktics"),onClick:()=>m({isStripeConfigModalOpen:!0})}),(0,o.createElement)(r.Modal,{title:c,open:u,onCancel:()=>m({isStripeConfigModalOpen:!1}),footer:null,className:"bkt-config-modal",centered:!0},(0,o.createElement)(s.A,null,n,(0,o.createElement)(r.Flex,{justify:"flex-end",gap:"small"},(0,o.createElement)(r.SecondaryButton,{size:"middle",onClick:()=>{const e=Object.fromEntries(t.map(e=>[e,""]));d(e)},text:(0,a.__)("Clear","booktics"),className:"bkt-neutral-soft-light-btn"}),(0,o.createElement)(r.PrimaryButton,{size:"middle",htmlType:"submit",text:(0,a.__)("Save","booktics"),loading:b})))))}},36759:(e,t,n)=>{n.r(t);var o=n(51609),l=n(66349);window.wp?.hooks.addFilter("booktics_connect_stripe","booktics",()=>(0,o.createElement)(l.default,null),10)},66349:(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var o=n(51609),l=n(22564),s=n(13788),i=n(27723);const{wrapWithTheme:r,SettingsConfigureDescription:a}=window?.booktics?.components||{},{INTEGRATIONS_DOCUMENTATION:c}=window?.booktics?.globalConstant||{},u=r(()=>{const e=["stripe_publishable_key","stripe_secret_key"];return(0,o.createElement)(o.Fragment,null,window?.location.href.includes("/settings")?(0,o.createElement)(a,{className:"bkt-configure-description"},(0,i.__)("Configure your Stripe settings here. Please ","booktics"),(0,o.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:c?.stripeDoc||"#"},(0,i.__)(" read documentation","booktics")),(0,i.__)(" for further assistance.")):null,(0,o.createElement)(s.default,{title:(0,i.__)("Stripe","booktics"),keys:e},(0,o.createElement)(l.TextInput,{label:(0,i.__)("Publishable Key","booktics"),name:e[0],rules:[{required:!0,message:(0,i.__)("Please enter Publishable Key","booktics")}],placeholder:(0,i.__)("Enter Publishable Key","booktics")}),(0,o.createElement)(l.TextInput,{label:(0,i.__)("Secret Key","booktics"),name:e[1],rules:[{required:!0,message:(0,i.__)("Please enter Secret Key","booktics")}],placeholder:(0,i.__)("Enter Secret Key","booktics")})))})}}]);