import{t as e}from"./skus-CJAzlvMK.js";var t=`https://chatgpt.com/codex/purchase/plus?checkout_from=codex_app`,n=`https://chatgpt.com/codex/purchase/go?checkout_from=codex_app`,r=`https://chatgpt.com/codex/purchase/pro5x?checkout_from=codex_app`,i=`https://chatgpt.com/codex/purchase/pro?checkout_from=codex_app`,a=`https://chatgpt.com/codex/purchase/codex_team?checkout_from=codex_app`,o=`https://chatgpt.com/codex/purchase/team?checkout_from=codex_app`,s=`https://chatgpt.com/#settings/Billing`,c=`https://help.openai.com/en/articles/7905690-how-to-cancel-your-apple-subscription-for-chatgpt-in-the-chatgpt-ios-app`,l=`https://help.openai.com/en/articles/8258076-how-to-cancel-a-subscription-in-the-chatgpt-android-app`,u={[e.FREE]:0,[e.GO]:1,[e.PLUS]:2,[e.PROLITE]:3,[e.PRO]:4};function d(e){return e===`chatgpt_mobile_ios`||e===`sora_mobile_ios`?`ios`:e===`chatgpt_mobile_android`?`android`:null}function f(t){if(!g(t))return null;switch(t){case e.FREE:return{displayPlan:`free`,pricePlan:t,cta:`upgrade`};case e.GO:return{displayPlan:`go`,pricePlan:t,cta:`upgrade`};case e.PLUS:return{displayPlan:`plus`,pricePlan:t,cta:`view`};case e.PROLITE:case e.PRO:return{displayPlan:`pro`,pricePlan:t,cta:`view`}}}function p(t){return t===e.GO||t===e.PLUS||t===e.PROLITE||t===e.PRO}function m({currentPlan:e,targetPlan:t}){return e===t?`current`:u[t]<u[e]?`downgrade`:`upgrade`}function h({currentPlan:a,targetPlan:o}){let s=m({currentPlan:a,targetPlan:o});return s===`current`?null:s===`downgrade`?`https://chatgpt.com/codex/downgrade/${o===e.PROLITE?`pro5x`:o}`:o===e.PLUS?t:o===e.GO?n:o===e.PROLITE?r:i}function g(t){return t===e.FREE||t===e.GO||t===e.PLUS||t===e.PROLITE||t===e.PRO}export{c as a,f as c,a as i,h as l,s as n,d as o,o as r,m as s,l as t,p as u};
//# sourceMappingURL=plan-management-state-DlOJb3eN.js.map