import { type TextStyle, type ViewStyle, StyleSheet } from "react-native"; import type { RowCardDynamicStyleType } from "./type"; import type { Mutable } from "../../types"; const stylesheet = StyleSheet.create({ container: { flexDirection: "row", alignItems: "center", alignSelf: "stretch" }, iconContainer: { justifyContent: "center", alignItems: "center" }, rightIconContainer: { }, title: { textAlign: "left" }, subTitle: { textAlign: "left" }, rightContainer: { justifyContent: "flex-end", flexDirection: "row", alignItems: "center" }, leftContainer: { justifyContent: "flex-start", flexDirection: "row", alignItems: "center" }, rightSubTitle: { }, rightTitle: { } }); export const useStyles = ({ isTransparentBackground, spaces, colors, type }: RowCardDynamicStyleType) => { const styles = { container: { backgroundColor: isTransparentBackground ? "transparent" : colors.content.container.mid, padding: spaces.spacingMd } as Mutable, title: { textAlign: "left" } as Mutable, subTitle: { textAlign: "left" } as Mutable, iconContainer: { paddingHorizontal: spaces.spacingSm } as Mutable, rightSubTitle: { textAlign: "right" } as Mutable, leftContainer: { paddingHorizontal: spaces.spacingSm } as Mutable, rightContainer: { paddingHorizontal: spaces.spacingSm } as Mutable, rightIconContainer: { paddingHorizontal: spaces.spacingSm } as Mutable, rightTitle: { textAlign: "right" } as Mutable }; if(type === "evenly") { styles.rightContainer.flex = 1; styles.leftContainer.flex = 1; } else { styles.leftContainer.flex = 1; } return styles; }; export default stylesheet;