import{_ as e}from"./main-tangy-colts-beg.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(a,t){return this.cache.has(a)?this.cache.get(a):(this.cache.set(a,t),t)}};const c=a=>({addConnectionHelpingText:e('You can find credentials from <a target="_blank" class="text-blue-600 underline" rel="noopener noreferrer nofollow" href="https://dashboard.stripe.com/account/apikeys">Here</a>. Please click on "Create Secret Key"'),componentName:a.componentName.connection,connectionsTypes:[{encryptKeys:["value"],label:e("API Key"),showKey:!1,type:"api_key",verifyConnection:{headers:{Authorization:""},method:"GET",responseKeyMatch:["object","available"],url:"https://api.stripe.com/v1/balance"}}],fieldType:"config",id:"connection-id",label:e("Select Connection"),onConnectionAddChange:"CONNECTION_ADD_CHANGE",onConnectionChange:"SET_CONNECTION",render:!0,value:void 0}),r=({$:a,e:t})=>{a.setThisComponent(n=>{a.util.isConnectionComponent(n)&&n.connectionsTypes.forEach(l=>{var o;l.type==="api_key"&&((o=l.verifyConnection)!=null&&o.headers)&&(l.verifyConnection.headers.Authorization=`Bearer ${t.value}`)})})},s=a=>({$:t,e:n})=>{t.setThisComponent(l=>{l.value=n}),t.setDb(l=>{l[a]=n})},d=[{label:e("Payments"),options:[{label:e("Payment Intent Created"),value:"payment_intent.created"},{label:e("Payment Intent Succeeded"),value:"payment_intent.succeeded"},{label:e("Payment Intent Failed"),value:"payment_intent.payment_failed"},{label:e("Charge Succeeded"),value:"charge.succeeded"},{label:e("Charge Failed"),value:"charge.failed"},{label:e("Charge Refunded"),value:"charge.refunded"}]},{label:e("Checkout"),options:[{label:e("Checkout Session Completed"),value:"checkout.session.completed"},{label:e("Checkout Session Expired"),value:"checkout.session.expired"}]},{label:e("Invoices"),options:[{label:e("Invoice Created"),value:"invoice.created"},{label:e("Invoice Finalized"),value:"invoice.finalized"},{label:e("Invoice Paid"),value:"invoice.paid"},{label:e("Invoice Payment Failed"),value:"invoice.payment_failed"},{label:e("Invoice Sent"),value:"invoice.sent"}]},{label:e("Subscriptions"),options:[{label:e("Subscription Created"),value:"customer.subscription.created"},{label:e("Subscription Updated"),value:"customer.subscription.updated"},{label:e("Subscription Deleted"),value:"customer.subscription.deleted"},{label:e("Subscription Trial Will End"),value:"customer.subscription.trial_will_end"}]},{label:e("Customers"),options:[{label:e("Customer Created"),value:"customer.created"},{label:e("Customer Updated"),value:"customer.updated"},{label:e("Customer Deleted"),value:"customer.deleted"}]},{label:e("Products & Prices"),options:[{label:e("Product Created"),value:"product.created"},{label:e("Price Created"),value:"price.created"},{label:e("Price Updated"),value:"price.updated"}]},{label:e("Payouts"),options:[{label:e("Payout Created"),value:"payout.created"},{label:e("Payout Paid"),value:"payout.paid"},{label:e("Payout Failed"),value:"payout.failed"}]},{label:e("Transfers"),options:[{label:e("Transfer Created"),value:"transfer.created"},{label:e("Transfer Failed"),value:"transfer.failed"}]}];export{r as a,c,s as h,d as s};
