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

<div data-swift-poster="bottom-left" class="d-grid position-relative align-content-end" data-swift-poster-height="@(Model.Item.GetString("Height"))">
	@if (Model.Item.TryGetImageFile("Image", out ImageFileViewModel image)) {
		<figure class="position-absolute top-0 bottom-0 end-0 start-0 m-0 pe-none ratio">
			<img class="object-fit-cover" src="@image.ToGetImage(new(){ Quality = 95 })" style="object-position: @image.GetFocalPointPercentage()" alt="@Model.Item?.GetString("AltText")">
		</figure>
	}

	<div data-swift-container class="position-relative z-1">
		<div data-swift-text class="mb-0-last-child">
			@if (Model.Item.TryGetString("Eyebrow", out string eyebrow)) {
				@eyebrow
			}
			@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 gap-2 align-items-center">
			@if (Model.Item.TryGetButton("FirstButton", out ButtonViewModel firstButton)) {
				<a href="@firstButton.Link.Url" class="btn btn-@firstButton.Style" data-dw-button="@firstButton.Style">@firstButton.Label</a>
			}
			@if (Model.Item.TryGetButton("SecondButton", out ButtonViewModel secondButton)) {
				<a href="@secondButton.Link.Url" class="btn btn-@secondButton.Style" data-dw-button="@secondButton.Style">@secondButton.Label</a>
			}
		</div>
	</div>
</div>
