/* Copyright 2026 Adobe. All rights reserved. This file is licensed to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ import { ButtonProps, ImageProps, ImageStyle, PressableProps, TextProps, TextStyle, ViewStyle } from 'react-native'; import { ViewProps } from 'react-native'; import { ContentCard, ContentCardData, ContentCardTemplate } from '../../models/ContentCard'; import { DismissButtonProps } from '../components/DismissButton/DismissButton'; export class ContentTemplate extends ContentCard { readonly type: ContentCardTemplate; constructor(data: ContentCardData, type: ContentCardTemplate, isRead: boolean = false) { super(data, isRead); this.type = type; } } /** Overrides for the structural pieces of the content card */ export interface ComponentOverrideProps { BodyProps?: Partial; ButtonContainerProps?: Partial; ButtonProps?: Partial>; ContainerProps?: Partial; ContentContainerProps?: Partial; DismissButtonProps?: DismissButtonProps; ImageContainerProps?: Partial; ImageProps?: Partial; TextProps?: Partial; TitleProps?: Partial; } /** The base style overrides available for content cards */ export interface ContentCardStyles { /** Applies to the root of the content card */ card?: ViewStyle; /** Applies to the container inside the content card, applied inside the card Pressable */ container?: ViewStyle; imageContainer?: ViewStyle; image?: ImageStyle; contentContainer?: ViewStyle; /** Applies to title and body properties, will be overridden by title and body styles */ text?: TextStyle; title?: TextStyle; body?: TextStyle; buttonContainer?: ViewStyle; button?: PressableProps['style']; buttonText?: TextStyle; dismissButton?: PressableProps['style']; } export type SmallImageContentStyle = ContentCardStyles; export type LargeImageContentStyle = ContentCardStyles; export type ImageOnlyContentStyle = Pick< ContentCardStyles, 'card' | 'imageContainer' | 'image' | 'dismissButton' >;