AI-Studio/app/MindWork AI Studio/Components/DynamicAssistantDropdown.razor

54 lines
1.8 KiB
Plaintext
Raw Normal View History

@using AIStudio.Tools.PluginSystem.Assistants.DataModel
<MudStack Row="true" Class='@this.MergeClasses(this.Class, "mb-3")' Style="@this.Style">
2026-03-13 00:51:48 +00:00
@if (this.IsMultiselect)
{
<MudSelect
T="string"
SelectedValues="@this.SelectedValues"
SelectedValuesChanged="@this.OnSelectedValuesChanged"
2026-03-13 01:01:44 +00:00
MultiSelectionTextFunc="@this.GetMultiSelectionText"
2026-03-13 00:51:48 +00:00
Label="@this.Label"
HelperText="@this.HelperText"
Placeholder="@this.Default.Display"
OpenIcon="@this.OpenIcon"
CloseIcon="@this.CloseIcon"
Adornment="@this.IconPosition"
AdornmentColor="@this.IconColor"
Variant="@this.Variant"
Margin="Margin.Normal"
MultiSelection="@true"
SelectAll="@this.HasSelectAll"
SelectAllText="@this.SelectAllText">
2026-03-13 01:01:44 +00:00
@foreach (var item in this.GetRenderedItems())
2026-03-13 00:51:48 +00:00
{
<MudSelectItem Value="@item.Value">
@item.Display
</MudSelectItem>
}
</MudSelect>
}
else
{
<MudSelect
T="string"
Value="@this.Value"
ValueChanged="@(val => this.OnValueChanged(val))"
Label="@this.Label"
HelperText="@this.HelperText"
Placeholder="@this.Default.Display"
OpenIcon="@this.OpenIcon"
CloseIcon="@this.CloseIcon"
Adornment="@this.IconPosition"
AdornmentColor="@this.IconColor"
Variant="@this.Variant"
Margin="Margin.Normal">
2026-03-13 01:01:44 +00:00
@foreach (var item in this.GetRenderedItems())
2026-03-13 00:51:48 +00:00
{
<MudSelectItem Value="@item.Value">
@item.Display
</MudSelectItem>
}
</MudSelect>
}
</MudStack>