import React from "react"; import { ScrollView, StyleSheet } from "react-native"; import type { DetailRendererProps } from "../../types/renderer.types"; import { ContentLinkAttributeSections } from "../shared/ContentLinkAttributeSections"; import { Hero } from "../shared/Hero"; import { SectionCard } from "../shared/SectionCard"; import { Paragraphs } from "../shared/Paragraphs"; import { asString } from "../helpers/value"; export function FourLevelsDetailRenderer({ content, data, definitions, presentationAttributes, }: DetailRendererProps) { const title = asString(data.name) || asString(data.title) || content.title; const overview = asString(data.overview); const clinicalManifestations = asString(data.clinical_menifestation) || asString(data.clinical_manifestations); const tongue = asString(data.tongue); const pulse = asString(data.pulse); const pathology = asString(data.pathology); const treatmentPrinciple = asString(data.treatment_principle) || asString(data["treatment principle"]); const treatment = asString(data.treatment); const explanation = asString(data.explanation); const contentText = asString(data.content); return ( {overview ? ( ) : null} {clinicalManifestations ? ( ) : null} {tongue ? ( ) : null} {pulse ? ( ) : null} {pathology ? ( ) : null} {treatmentPrinciple ? ( ) : null} {treatment ? ( ) : null} {explanation ? ( ) : null} {contentText ? ( ) : null} ); } const styles = StyleSheet.create({ content: { paddingHorizontal: 18, paddingTop: 16, paddingBottom: 40, gap: 14, }, });