import { makeStyles } from '@cleartrip/ct-design-style-manager'; /** * Static style slots for the Image component. * * Image has no built-in chrome (no border/spacing/background) so the * shared slot is an empty `root` — present so both the web and native * entry points have a consistent `useWebMergeStyles` / `useNativeMergeStyles` * seed to layer caller-provided styles on top of. * * @see Migration.MD — "Step 5 — Apply static styles with makeStyles" */ const staticImageStyles = makeStyles(() => ({ root: {}, })); export default staticImageStyles; /** * Utility: is this URL a static `.svg` asset? * * Native `FastImage` cannot decode SVGs, so the native entry point * detects them and delegates to `react-native-svg`'s `SvgUri` instead. * Web lets the browser handle SVG natively, so this helper is * native-only in practice. */ export function isSvg(url: string | undefined | null): boolean { return typeof url === 'string' && url.endsWith('.svg'); }