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

@if (Model.Item.TryGetImageFile("Image", out ImageFileViewModel image)) {
	<figure class="d-flex align-items-center justify-content-center position-relative m-0">
		@if (image.IsSvg()) {
			@ReadFile(image.Path)
		} else {
			<img src="@image.ToGetImage()" class="img-fluid" alt="@Model.Item?.GetString("AltText")" />
		}
		@if (Model.Item.TryGetLink("Link", out LinkViewModel link)) {
			<a href="@link.Url" class="stretched-link" title="@link.Url"></a>
		}
	</figure>
}
