{"ast":null,"code":"import getComputedStyle from \"./getComputedStyle\";\nimport hyphenate from \"./hyphenateStyle\";\nimport isTransform from \"./isTransform\";\n\nfunction style(node, property) {\n  var css = '';\n  var transforms = '';\n\n  if (typeof property === 'string') {\n    return node.style.getPropertyValue(hyphenate(property)) || getComputedStyle(node).getPropertyValue(hyphenate(property));\n  }\n\n  Object.keys(property).forEach(function (key) {\n    var value = property[key];\n\n    if (!value && value !== 0) {\n      node.style.removeProperty(hyphenate(key));\n    } else if (isTransform(key)) {\n      transforms += key + \"(\" + value + \") \";\n    } else {\n      css += hyphenate(key) + \": \" + value + \";\";\n    }\n  });\n\n  if (transforms) {\n    css += \"transform: \" + transforms + \";\";\n  }\n\n  node.style.cssText += \";\" + css;\n}\n\nexport default style;","map":{"version":3,"sources":["/Users/rohitsingh/Documents/projects/new-nativebase-setup/NativeBase/node_modules/@react-native-aria/overlays/node_modules/dom-helpers/esm/css.js"],"names":["getComputedStyle","hyphenate","isTransform","style","node","property","css","transforms","getPropertyValue","Object","keys","forEach","key","value","removeProperty","cssText"],"mappings":"AAAA,OAAOA,gBAAP;AACA,OAAOC,SAAP;AACA,OAAOC,WAAP;;AAEA,SAASC,KAAT,CAAeC,IAAf,EAAqBC,QAArB,EAA+B;AAC7B,MAAIC,GAAG,GAAG,EAAV;AACA,MAAIC,UAAU,GAAG,EAAjB;;AAEA,MAAI,OAAOF,QAAP,KAAoB,QAAxB,EAAkC;AAChC,WAAOD,IAAI,CAACD,KAAL,CAAWK,gBAAX,CAA4BP,SAAS,CAACI,QAAD,CAArC,KAAoDL,gBAAgB,CAACI,IAAD,CAAhB,CAAuBI,gBAAvB,CAAwCP,SAAS,CAACI,QAAD,CAAjD,CAA3D;AACD;;AAEDI,EAAAA,MAAM,CAACC,IAAP,CAAYL,QAAZ,EAAsBM,OAAtB,CAA8B,UAAUC,GAAV,EAAe;AAC3C,QAAIC,KAAK,GAAGR,QAAQ,CAACO,GAAD,CAApB;;AAEA,QAAI,CAACC,KAAD,IAAUA,KAAK,KAAK,CAAxB,EAA2B;AACzBT,MAAAA,IAAI,CAACD,KAAL,CAAWW,cAAX,CAA0Bb,SAAS,CAACW,GAAD,CAAnC;AACD,KAFD,MAEO,IAAIV,WAAW,CAACU,GAAD,CAAf,EAAsB;AAC3BL,MAAAA,UAAU,IAAIK,GAAG,GAAG,GAAN,GAAYC,KAAZ,GAAoB,IAAlC;AACD,KAFM,MAEA;AACLP,MAAAA,GAAG,IAAIL,SAAS,CAACW,GAAD,CAAT,GAAiB,IAAjB,GAAwBC,KAAxB,GAAgC,GAAvC;AACD;AACF,GAVD;;AAYA,MAAIN,UAAJ,EAAgB;AACdD,IAAAA,GAAG,IAAI,gBAAgBC,UAAhB,GAA6B,GAApC;AACD;;AAEDH,EAAAA,IAAI,CAACD,KAAL,CAAWY,OAAX,IAAsB,MAAMT,GAA5B;AACD;;AAED,eAAeH,KAAf","sourcesContent":["import getComputedStyle from './getComputedStyle';\nimport hyphenate from './hyphenateStyle';\nimport isTransform from './isTransform';\n\nfunction style(node, property) {\n  var css = '';\n  var transforms = '';\n\n  if (typeof property === 'string') {\n    return node.style.getPropertyValue(hyphenate(property)) || getComputedStyle(node).getPropertyValue(hyphenate(property));\n  }\n\n  Object.keys(property).forEach(function (key) {\n    var value = property[key];\n\n    if (!value && value !== 0) {\n      node.style.removeProperty(hyphenate(key));\n    } else if (isTransform(key)) {\n      transforms += key + \"(\" + value + \") \";\n    } else {\n      css += hyphenate(key) + \": \" + value + \";\";\n    }\n  });\n\n  if (transforms) {\n    css += \"transform: \" + transforms + \";\";\n  }\n\n  node.style.cssText += \";\" + css;\n}\n\nexport default style;"]},"metadata":{},"sourceType":"module"}