import apiFetch from"../../functions/fetch";import{addQueryArgs}from"@wordpress/url";const path="surecart/v1/customers/me";export const getCurrentCustomer=(e="live")=>apiFetch({path:addQueryArgs(path,{mode:e,expand:["shipping_address","billing_address"]})});const ADDRESS_CONTENT_FIELDS=["name","line_1","line_2","city","state","postal_code"],ADDRESS_DATA_FIELDS=[...ADDRESS_CONTENT_FIELDS,"country"];export const isAddressEmpty=e=>!e||ADDRESS_CONTENT_FIELDS.every((r=>!e[r]));export const hasAddressData=e=>!(!e||Array.isArray(e))&&ADDRESS_DATA_FIELDS.some((r=>!!e[r]));