43 lines
1.5 KiB
Swift
43 lines
1.5 KiB
Swift
//
|
|
// ModalModel.swift
|
|
// VDS
|
|
//
|
|
// Created by Kanamarlapudi, Vasavi on 09/09/24.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
|
|
extension Modal {
|
|
|
|
/// Model used to represent the modal.
|
|
public struct ModalModel: Equatable {
|
|
/// Current Surface and this is used to pass down to child objects that implement Surfacable
|
|
public var closeButtonText: String
|
|
public var title: String?
|
|
public var content: String?
|
|
public var contentView: UIView?
|
|
public var accessibleText: String?
|
|
public var contentViewAlignment: UIStackView.Alignment?
|
|
public var buttonData: [ButtonBase]?
|
|
public var fullScreenDialog: Bool
|
|
public init(closeButtonText: String = "Close",
|
|
title: String? = nil,
|
|
content: String? = nil,
|
|
contentView: UIView? = nil,
|
|
buttonData: [ButtonBase]? = nil,
|
|
fullScreenDialog: Bool = false,
|
|
accessibleText: String? = "Modal",
|
|
contentViewAlignment: UIStackView.Alignment = .leading) {
|
|
self.closeButtonText = closeButtonText
|
|
self.title = title
|
|
self.content = content
|
|
self.contentView = contentView
|
|
self.accessibleText = accessibleText
|
|
self.contentViewAlignment = contentViewAlignment
|
|
self.buttonData = buttonData
|
|
self.fullScreenDialog = fullScreenDialog
|
|
}
|
|
}
|
|
}
|