2026-02-24 16:21:50 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
2026-02-24 10:31:16 +00:00
|
|
|
namespace AIStudio.Tools.PluginSystem.Assistants.DataModel;
|
|
|
|
|
|
2026-02-24 16:21:50 +00:00
|
|
|
internal sealed class AssistantImage : AssistantComponentBase
|
2026-02-24 10:31:16 +00:00
|
|
|
{
|
2026-02-24 10:39:17 +00:00
|
|
|
public override AssistantComponentType Type => AssistantComponentType.IMAGE;
|
2026-02-24 10:31:16 +00:00
|
|
|
public Dictionary<string, object> Props { get; set; } = new();
|
|
|
|
|
public List<IAssistantComponent> Children { get; set; } = new();
|
|
|
|
|
|
|
|
|
|
public string Src
|
|
|
|
|
{
|
2026-02-24 16:21:50 +00:00
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.Src));
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.Src), value);
|
2026-02-24 10:31:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Alt
|
|
|
|
|
{
|
2026-02-24 16:21:50 +00:00
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.Alt));
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.Alt), value);
|
2026-02-24 10:31:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Caption
|
|
|
|
|
{
|
2026-02-24 16:21:50 +00:00
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.Caption));
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.Caption), value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Class
|
|
|
|
|
{
|
|
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.Class));
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.Class), value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Style
|
|
|
|
|
{
|
|
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.Style));
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.Style), value);
|
2026-02-24 10:31:16 +00:00
|
|
|
}
|
|
|
|
|
}
|