{"version":3,"file":"shouldRenderNativePlatform.js","names":[],"sources":["esm/shouldRenderNativePlatform.js"],"sourcesContent":["import { currentPlatform } from \"@tamagui/constants\";\nconst ALL_PLATFORMS = [\"web\", \"android\", \"ios\"];\nfunction shouldRenderNativePlatform(nativeProp) {\n  if (!nativeProp) {\n    return null;\n  }\n  const userRequestedPlatforms = resolvePlatformNames(nativeProp);\n  for (const platform of ALL_PLATFORMS) {\n    if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {\n      return platform;\n    }\n  }\n  return null;\n}\nfunction resolvePlatformNames(nativeProp) {\n  const platforms = nativeProp === true ? ALL_PLATFORMS : nativeProp === false ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];\n  const set = new Set(platforms);\n  if (set.has(\"mobile\")) {\n    set.add(\"android\");\n    set.add(\"ios\");\n    set.delete(\"mobile\");\n  }\n  return set;\n}\nexport {\n  shouldRenderNativePlatform\n};\n//# sourceMappingURL=shouldRenderNativePlatform.js.map\n"],"mappings":";;;AACA,MAAM,gBAAgB;CAAC;CAAO;CAAW;AAAK;AAC9C,SAAS,2BAA2B,YAAY;CAC9C,IAAI,CAAC,YAAY;EACf,OAAO;CACT;CACA,MAAM,yBAAyB,qBAAqB,UAAU;CAC9D,KAAK,MAAM,YAAY,eAAe;EACpC,IAAI,aAAa,mBAAmB,uBAAuB,IAAI,QAAQ,GAAG;GACxE,OAAO;EACT;CACF;CACA,OAAO;AACT;AACA,SAAS,qBAAqB,YAAY;CACxC,MAAM,YAAY,eAAe,OAAO,gBAAgB,eAAe,QAAQ,CAAC,IAAI,MAAM,QAAQ,UAAU,IAAI,aAAa,CAAC,UAAU;CACxI,MAAM,MAAM,IAAI,IAAI,SAAS;CAC7B,IAAI,IAAI,IAAI,QAAQ,GAAG;EACrB,IAAI,IAAI,SAAS;EACjB,IAAI,IAAI,KAAK;EACb,IAAI,OAAO,QAAQ;CACrB;CACA,OAAO;AACT"}