@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
@using Dynamicweb.Frontend

<div class="d-flex align-items-start">
	@if (Model.Item.TryGetImageFile("Icon", out ImageFileViewModel image))
	{
		<figure class="icon-3 m-0 me-4 p-2 text-body bg-body bg-opacity-25"
			style="--bs-body-bg-rgb: var(--bs-body-color-rgb);">
			<span class="p-1">
				@if (image.IsSvg())
				{
					@ReadFile(image.Path)
				}
				else
				{
					<img src="@image.ToGetImage(new() { Width = 60 })" alt="@image.Name" height="60" width="60" class="img-fluid" />
				}
			</span>
		</figure>
	}
	<div class="p-0">
		<div data-swift-text class="mb-0-last-child p-0">
			@if (Model.Item.TryGetString("Title", out string title))
			{
				@title
			}
			@if (Model.Item.TryGetString("Text", out string text))
			{
				@text
			}
		</div>
		<div class="d-flex flex-wrap align-items-center">
			@if (Model.Item.TryGetButton("Button", out ButtonViewModel button))
			{
				<a href="@button.Link.Url" class="btn btn-@button.Style" data-dw-button="@button.Style">@button.Label</a>
			}
		</div>
	</div>
</div>
