{"version":3,"sources":["../src/card/index.native.tsx"],"names":["spacing","forwardRef","Card","useTheme","radiusScale","Pressable","jsx","View"],"mappings":";;;;;;;;;AAaA,IAAM,MAAA,GAAsC;AAAA,EAC1C,IAAA,EAAM,CAAA;AAAA,EACN,EAAA,EAAIA,aAAQ,CAAC,CAAA;AAAA,EACb,EAAA,EAAIA,aAAQ,CAAC,CAAA;AAAA,EACb,EAAA,EAAIA,aAAQ,CAAC;AACf,CAAA;AAYO,IAAM,IAAA,GAAOC,gBAAA,CAA4B,SAASC,KAAAA,CACvD,EAAE,OAAA,GAAU,SAAA,EAAW,OAAA,GAAU,IAAA,EAAM,SAAS,IAAA,EAAM,OAAA,EAAS,KAAA,EAAO,QAAA,IACtE,GAAA,EACA;AACA,EAAA,MAAM,EAAE,MAAA,EAAO,GAAIC,eAAA,EAAS;AAC5B,EAAA,MAAM,EAAA,GAAK,OAAA,KAAY,QAAA,GAAW,MAAA,CAAO,gBAAgB,MAAA,CAAO,WAAA;AAEhE,EAAA,MAAM,IAAA,GAAkB;AAAA,IACtB,eAAA,EAAiB,EAAA;AAAA,IACjB,WAAA,EAAa,CAAA;AAAA,IACb,aAAa,MAAA,CAAO,MAAA;AAAA,IACpB,YAAA,EAAcC,YAAY,MAAM,CAAA;AAAA,IAChC,OAAA,EAAS,OAAO,OAAO,CAAA;AAAA,IACvB,GAAG;AAAA,GACL;AAEA,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,sCACGC,qBAAA,EAAA,EAAU,GAAA,EAAU,OAAA,EAAkB,KAAA,EAAO,CAAC,EAAE,OAAA,EAAQ,KAAM,CAAC,MAAM,OAAA,IAAW,EAAE,SAAS,IAAA,EAAM,GAC/F,QAAA,EACH,CAAA;AAAA,EAEJ;AACA,EAAA,uBACEC,cAAA,CAACC,gBAAA,EAAA,EAAK,GAAA,EAAU,KAAA,EAAO,MACpB,QAAA,EACH,CAAA;AAEJ,CAAC","file":"card.native.cjs","sourcesContent":["/**\n * Card (native). Bordered surface matching the web shape. Interactive\n * cards render as a Pressable.\n */\nimport { forwardRef, type ReactNode } from \"react\";\nimport { Pressable, View, type ViewStyle } from \"react-native\";\nimport { useTheme } from \"@plyxui/styles\";\nimport { radius as radiusScale, spacing } from \"@plyxui/core\";\n\nexport type CardVariant = \"outline\" | \"raised\" | \"sunken\";\nexport type CardPadding = \"none\" | \"sm\" | \"md\" | \"lg\";\nexport type CardRadius = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nconst padMap: Record<CardPadding, number> = {\n  none: 0,\n  sm: spacing[3],\n  md: spacing[4],\n  lg: spacing[6],\n};\n\nexport interface CardProps {\n  variant?: CardVariant;\n  padding?: CardPadding;\n  radius?: CardRadius;\n  interactive?: boolean;\n  onPress?: () => void;\n  style?: ViewStyle;\n  children?: ReactNode;\n}\n\nexport const Card = forwardRef<View, CardProps>(function Card(\n  { variant = \"outline\", padding = \"md\", radius = \"lg\", onPress, style, children },\n  ref,\n) {\n  const { colors } = useTheme();\n  const bg = variant === \"sunken\" ? colors.containerFill : colors.surfaceFill;\n\n  const base: ViewStyle = {\n    backgroundColor: bg,\n    borderWidth: 1,\n    borderColor: colors.stroke,\n    borderRadius: radiusScale[radius],\n    padding: padMap[padding],\n    ...style,\n  };\n\n  if (onPress) {\n    return (\n      <Pressable ref={ref} onPress={onPress} style={({ pressed }) => [base, pressed && { opacity: 0.85 }]}>\n        {children}\n      </Pressable>\n    );\n  }\n  return (\n    <View ref={ref} style={base}>\n      {children}\n    </View>\n  );\n});\n"]}