OCDevManageSubscriptionPricingPaidTermSectionRowItem_priceTiersQuery.graphql",[],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"applicationID"},{defaultValue:null,kind:"LocalArgument",name:"term"}],b=[{kind:"Variable",name:"application_id",variableName:"applicationID"},{kind:"Literal",name:"force_99_suffix",value:!0},{kind:"Variable",name:"subscription_term",variableName:"term"}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"OCDevManageSubscriptionPricingPaidTermSectionRowItem_priceTiersQuery",selections:[{alias:null,args:b,concreteType:"XOCApprovedPricePoint",kind:"LinkedField",name:"xoc_eligible_price_tiers",plural:!0,selections:[{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionPriceChangeField_priceTiers"},{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionPriceField_priceTiers"},{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionPricingPaidTermSectionRowItem_priceTiers"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"OCDevManageSubscriptionPricingPaidTermSectionRowItem_priceTiersQuery",selections:[{alias:null,args:b,concreteType:"XOCApprovedPricePoint",kind:"LinkedField",name:"xoc_eligible_price_tiers",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"amount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"key",storageKey:null}],storageKey:null}]},params:{id:"24561131550190439",metadata:{},name:"OCDevManageSubscriptionPricingPaidTermSectionRowItem_priceTiersQuery",operationKind:"query",text:null}}}();e.exports=a}),null);
-----
OCDevManageSubscriptionPricingPaidTermSectionRowItem_priceTiers.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:{plural:!0},name:"OCDevManageSubscriptionPricingPaidTermSectionRowItem_priceTiers",selections:[{alias:null,args:null,kind:"ScalarField",name:"amount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"key",storageKey:null}],type:"XOCApprovedPricePoint",abstractKey:null};e.exports=a}),null);
-----
OCDevManageSubscriptionPricingPaidTermsSection.react",["fbt","ix","GeoAccordionList.react","GeoAccordionListItem.react","GeoButton.react","GeoFlexbox.react","GeoHeading.react","GeoListItem.react","OCDevManageSubscriptionPricingPaidTermSectionRowItem.react","OCDevManageSubscriptionPricingPaidTermsSection_item.graphql","OCDevManageSubscriptionPricingPaidTermsSection_organization.graphql","OCDevManageSubscriptionUtils","RelayHooks","fbicon","geoMargin","react"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l,m=l||d("react");function a(a){var e=a.formState,f=a.isAppLab,g=a.item,l=a.organizationKey,n=a.setFormState,o=d("RelayHooks").useFragment(j!==void 0?j:j=b("OCDevManageSubscriptionPricingPaidTermsSection_item.graphql"),g),p=d("RelayHooks").useFragment(k!==void 0?k:k=b("OCDevManageSubscriptionPricingPaidTermsSection_organization.graphql"),l),q=function(a){n(function(b){return babelHelpers["extends"]({},b,{paidOffers:b.paidOffers.filter(function(b){return b.id!==a})})})};a=e.paidOffers.filter(function(a){return a.status!=="CANCELLED"}).map(function(a,b){var g;g=o==null?void 0:(g=o.latest_revision)==null?void 0:(g=g.reviewable_offer_group_with_fallback)==null?void 0:(g=g.offers)==null?void 0:(g=g.nodes)==null?void 0:g.find(function(b){return b.id===a.id});g=(g=g==null?void 0:g.price_with_formatted_term_and_label)!=null?g:d("OCDevManageSubscriptionUtils").getDefaultOfferLabel(b+1);return m.jsx(c("GeoAccordionListItem.react"),{"data-testid":void 0,isInitiallyExpanded:(b=a.id)==null?void 0:b.includes(d("OCDevManageSubscriptionUtils").NEW_PAID_OFFER_KEY),item:m.jsx(c("GeoListItem.react"),{label:g},a.id),children:m.jsx(c("OCDevManageSubscriptionPricingPaidTermSectionRowItem.react"),{formState:e,isAppLab:f,offer:a,organizationKey:p,setOffer:function(a){return n(function(b){return babelHelpers["extends"]({},b,{paidOffers:b.paidOffers.map(function(b){return b.id===a.id?a:b})})})},onRemove:q},a.id)},a.id)});return m.jsxs(c("GeoFlexbox.react"),{direction:"column",children:[m.jsx(c("GeoHeading.react"),{level:4,children:h._("Subscription plans")}),m.jsx(c("GeoAccordionList.react"),{xstyle:[c("geoMargin").horiz8,c("geoMargin").top16],children:a}),m.jsx(c("GeoButton.react"),{disabledMessage:f?h._("Only monthly subscriptions are available to App Lab apps at the moment."):h._("You can only have one subscription price per billing term"),icon:d("fbicon")._(i("487086"),16),isDisabled:d("OCDevManageSubscriptionUtils").getAvailablePaidOfferTerms(e,f).length===0,label:h._("Add another subscription term"),xstyle:c("geoMargin").top16,onClick:function(){return n(function(a){return babelHelpers["extends"]({},a,{paidOffers:[].concat(a.paidOffers,[d("OCDevManageSubscriptionUtils").getNewPaidOfferEntry(a,f)])})})}})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
OCDevManageSubscriptionPricingPaidTermSectionRowItem.react",["fbt","ix","GeoButton.react","GeoFlexbox.react","GeoModal.react","GeoModalFooter.react","GeoModalHeader.react","GeoSelector.react","GeoSelectorItem.react","GeoText.react","OCDevManageSubscriptionPricingPaidTermSectionRowItem_organization.graphql","OCDevManageSubscriptionUtils","OCDevManageSubscriptionsPriceInput.react","OCDevUISpacedLayout.react","fbicon","geoMargin","getOCSubscriptionTermLabelV2","react","react-relay"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l=k||(k=d("react")),m=k.useState;function a(a){var e,f=a.formState,g=a.isAppLab,k=a.offer,n=a.onRemove,o=a.organizationKey,p=a.setOffer;a=d("react-relay").useFragment(j!==void 0?j:j=b("OCDevManageSubscriptionPricingPaidTermSectionRowItem_organization.graphql"),o);var q=d("OCDevManageSubscriptionUtils").getAvailablePaidOfferTerms(f,g),r=k.id;o=m(!1);var s=o[0],t=o[1];o=f.introOffers.some(function(a){return a.trialTerm===k.term});return r==null?null:l.jsxs(c("GeoFlexbox.react"),{direction:"column",children:[l.jsxs(c("GeoFlexbox.react"),{alignItems:"end",direction:"row",children:[l.jsx(c("GeoSelector.react"),{isDisabled:!((e=k.id)==null?void 0:e.includes(d("OCDevManageSubscriptionUtils").NEW_PAID_OFFER_KEY)),label:h._("Subscription term"),placeholder:h._("Select a term"),value:k.term,xstyle:c("geoMargin").end8,onChange:function(a){return p(babelHelpers["extends"]({},k,{term:a}))},children:d("OCDevManageSubscriptionUtils").getAllowedPaidTerms(g).map(function(a){return l.jsx(c("GeoSelectorItem.react"),{disabledMessage:h._("You can only have one subscription price per billing term"),isDisabled:!q.includes(a)&&a!==k.term,label:c("getOCSubscriptionTermLabelV2")(a),value:a},a)})}),l.jsx(c("OCDevManageSubscriptionsPriceInput.react"),{isAppLab:g,isDisabled:k.status==="PUBLISHED",organization:a,term:(e=k.term)!=null?e:"NONE",value:k.price,onChange:function(a){if(a==null)return;p(babelHelpers["extends"]({},k,{price:a}))}})]}),l.jsxs(c("GeoFlexbox.react"),{direction:"column",children:[l.jsx(c("GeoButton.react"),{disabledMessage:o?h._("This subscription has a corresponding intro offer. In order to remove this subscription, you must first remove the intro offer."):h._("At least one subscription plan is required to submit for review"),icon:d("fbicon")._(i("483828"),16),isDisabled:o||f.paidOffers.length===1,label:h._("Remove subscription"),xstyle:c("geoMargin").top8,onClick:function(){r.includes(d("OCDevManageSubscriptionUtils").NEW_PAID_OFFER_KEY)?n(r):t(!0)}}),l.jsx(c("GeoModal.react"),{footer:l.jsx(c("GeoModalFooter.react"),{primaryButton:l.jsx(c("GeoButton.react"),{label:h._("u79fbu9664"),variant:"primary",onClick:function(){p(babelHelpers["extends"]({},k,{status:"CANCELLED"})),t(!1)}}),secondaryButton:l.jsx(c("GeoButton.react"),{label:h._("u53d6u6d88"),onClick:function(){return t(!1)}})}),header:l.jsx(c("GeoModalHeader.react"),{heading:h._("Do you want to remove this subscription term?")}),isShown:s,onHide:function(){return t(!1)},children:l.jsxs(c("OCDevUISpacedLayout.react"),{xstyle:c("geoMargin").horiz16,children:[l.jsx(c("GeoText.react"),{children:h._("This subscription will still be available to existing subscribers, but unavailable to new subscribers.")}),l.jsx(c("GeoText.react"),{children:h._("If you remove this subscription, you won"t be able to recover it later. However, you can recreate it at any time.")})]})})]})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
OCDevManageSubscriptionPricingPaidTermsSection_organization.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OCDevManageSubscriptionPricingPaidTermsSection_organization",selections:[{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionPricingPaidTermSectionRowItem_organization"}],type:"Organization",abstractKey:null};e.exports=a}),null);
-----
OCDevManageSubscriptionPricingPaidTermSectionRowItem_organization.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OCDevManageSubscriptionPricingPaidTermSectionRowItem_organization",selections:[{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionsPriceInput_organization"}],type:"Organization",abstractKey:null};e.exports=a}),null);
-----
OCDevManageSubscriptionPricingPaidTermSectionRowItem.react",["fbt","ix","GeoBaseRowLayout.react","GeoButton.react","GeoSelector.react","GeoSelectorItem.react","OCDevManageSubscriptionPricingPaidTermSectionRowItem_organization.graphql","OCDevManageSubscriptionUtils","OCDevManageSubscriptionsPriceInput.react","fbicon","geoMargin","getOCSubscriptionTermLabelV2","react","react-relay"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l=k||d("react");function a(a){var e=a.formState,f=a.offer,g=a.onRemove,k=a.organizationKey,m=a.setOffer;a=d("react-relay").useFragment(j!==void 0?j:j=b("OCDevManageSubscriptionPricingPaidTermSectionRowItem_organization.graphql"),k);var n=d("OCDevManageSubscriptionUtils").getAvailablePaidOfferTerms(e),o=f.id;return o==null?null:l.jsxs(c("GeoBaseRowLayout.react"),{align:"end",children:[l.jsx(c("GeoSelector.react"),{isDisabled:!((k=f.id)==null?void 0:k.includes(d("OCDevManageSubscriptionUtils").NEW_PAID_OFFER_KEY)),label:h._("Billing frequency"),placeholder:h._("Select a term"),value:f.term,xstyle:c("geoMargin").end8,onChange:function(a){return m(babelHelpers["extends"]({},f,{term:a}))},children:d("OCDevManageSubscriptionUtils").ALLOWED_PAID_TERMS.map(function(a){return l.jsx(c("GeoSelectorItem.react"),{isDisabled:!n.includes(a)&&a!==f.term,label:c("getOCSubscriptionTermLabelV2")(a),value:a},a)})}),l.jsx(c("OCDevManageSubscriptionsPriceInput.react"),{isAppLab:!1,organization:a,term:(e=f.term)!=null?e:"NONE",value:f.priceOffset,onChange:function(a){if(a==null)return;m(babelHelpers["extends"]({},f,{priceOffset:a}))}}),o.includes(d("OCDevManageSubscriptionUtils").NEW_PAID_OFFER_KEY)&&l.jsx(c("GeoButton.react"),{icon:d("fbicon")._(i("478237"),16),isLabelHidden:!0,label:"Remove offer",onClick:function(){return g(o)}})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
OCDevManageSubscriptionPricingPaidTermsSection_organization.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OCDevManageSubscriptionPricingPaidTermsSection_organization",selections:[{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionPricingPaidTermSectionRowItem_organization"}],type:"Organization",abstractKey:null};e.exports=a}),null);
-----
OCDevManageSubscriptionPricingPaidTermSectionRowItem_organization.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OCDevManageSubscriptionPricingPaidTermSectionRowItem_organization",selections:[{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionsPriceInput_organization"}],type:"Organization",abstractKey:null};e.exports=a}),null);
-----