import{normalizeEntities}from"../../../../admin/schema";import apiFetch from"../../functions/fetch";import{addQueryArgs}from"@wordpress/url";const path="surecart/v1/products/";export const getPricesAndProducts=async({ids:r,archived:t=!1})=>{const e=await apiFetch({path:addQueryArgs("surecart/v1/prices/",{ids:r,archived:t,expand:["product"]})});return normalizePrices(e)};export const normalizePrices=r=>{const{entities:t}=normalizeEntities(r);return{prices:null==t?void 0:t.price,products:null==t?void 0:t.product}};export const getProducts=async({query:r})=>await apiFetch({path:addQueryArgs(path,r)});