import{zC as e}from"./6ec9a0fa.rdcQt2v8.js";import{n as i,t as o}from"./f1754c88.Brd5q1On.js";function t({shop:t,source:s,checkout:n},{isPickupSelected:l,vaultedSections:r}){const{phone:a,email:u,shippingAddress:c,billingAddress:d}=n.negotiator.parts,p=o({isShippingRequired:n.isShippingRequired.value,isPickupSelected:l,shippingCountryCode:c.fields.countryCode.value,billingCountryCode:d.fields.countryCode.value}),g=i(t,p),h=n.identity.current.value,v=(Boolean(g)||"OFF"!==t.smsMarketing)&&"shopPay"!==h&&"businessCustomer"!==h;let f;if(n.configuration.visibility.showSmsMarketing&&v&&!1!==n.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig?.smsMarketingEnabled&&!e(s)){let e;e=a.value&&!u.value?"contact":l||!n.isShippingRequired.value?"billing":"delivery",f=r[e]?"root":e}else f="none";return{isNone:"none"===f,isContact:"contact"===f,isDelivery:"delivery"===f,isBilling:"billing"===f,isRoot:"root"===f}}export{t};