Functions/New-IAWidgetConfigurationBasesObject.ps1

Function New-IAWidgetConfigurationBasesObject{
    Param(
        [String]$SideTextContent,
        [Bool]$SideTextEnabled = $false,
        [String]$SideTextPosition = "Right",
        [String]$SideTextWidth = "Single"
    )
    $IAWidgetConfigurationBasesObject = New-Object -TypeName PSObject
    $IAWidgetConfigurationBasesObject | Add-Member -MemberType NoteProperty -Name 'SideTextEnabled' -Value $SideTextEnabled
    $IAWidgetConfigurationBasesObject | Add-Member -MemberType NoteProperty -Name 'SideTextPosition' -Value $SideTextPosition
    $IAWidgetConfigurationBasesObject | Add-Member -MemberType NoteProperty -Name 'SideTextWidth' -Value $SideTextWidth

    if($SideTextContent){
        $IAWidgetConfigurationBasesObject | Add-Member -MemberType NoteProperty -Name 'SideTextContent' -Value $SideTextContent
    }

    return $IAWidgetConfigurationBasesObject
}