const convertLineItemsToLineItemData=i=>((null==i?void 0:i.data)||[]).map((i=>{var e;return{...(null==i?void 0:i.id)?{id:i.id}:{},price_id:i.price.id,quantity:i.quantity,variant_id:null===(e=i.variant)||void 0===e?void 0:e.id}})),getLineItemPriceIds=i=>((null==i?void 0:i.data)||[]).map((i=>i.price.id)),getLineItemByPriceId=(i,e)=>((null==i?void 0:i.data)||[]).find((i=>i.price.id===e)),isPriceInOrder=(i,e)=>!!getLineItemPriceIds(null==e?void 0:e.line_items).find((e=>(null==i?void 0:i.id)===e)),hasSubscription=i=>{var e,n,d;return!!(null===(n=null===(e=null==i?void 0:i.line_items)||void 0===e?void 0:e.data)||void 0===n?void 0:n.length)&&(null===(d=null==i?void 0:i.line_items.data)||void 0===d?void 0:d.some((i=>{var e;return null===(e=null==i?void 0:i.price)||void 0===e?void 0:e.recurring_interval_count})))};export{convertLineItemsToLineItemData as c,getLineItemByPriceId as g,hasSubscription as h,isPriceInOrder as i};