{if is_null($i)}
	{assign var="i" value='tmpCount'}
	{assign var="suffix" value='tmpSuffix'}
	{assign var="defaultID" value='tmpDefaultID'}
{else}
	{assign var="defaultID" value=0}
{/if}
{if !isset($pathID) || is_null($pathID)}
	{assign var="pathID" value=''}
{/if}
<div id="dof{$suffix}{$i}" class="lp-offer-item qkPage">
	<input type="hidden" name="hidOfferID{$suffix}{$i}" id="hidOfferID{$suffix}{$i}" value="{if $pathID !== ''}{$offerDetails[$pathID][$i]["DestinationID"]|default:0}{else}{$offerDetails[$i]["DestinationID"]|default:0}{/if}"/>
	<div class="row">
		<div class="col-lg-4 col-sm-6">
			<div class="form-group">
				<select name="ddlPredefOffer{$suffix}{$i}" id="ddlPredefOffer{$suffix}{$i}" class="form-control" onchange="loadPredefOffer('{$suffix}{$i}')">
					{if $pathID !== ''}
						{assign var=selectedPredefOffer value=$offerDetails[$pathID][$i]["PredefOfferID"]|default:0}
					{else}
						{assign var=selectedPredefOffer value=$offerDetails[$i]["PredefOfferID"]|default:0}
					{/if}
					{html_options options=$predefOffersArray selected=$selectedPredefOffer}
				</select>
			</div>
		</div>
        
        <div class="col-lg-2 col-3 max-w-lg-140">
			<div class="form-group">
				<input type="text" name="txtPageIDOffer{$suffix}{$i}" id="txtPageIDOffer{$suffix}{$i}" class="form-control max-w-lg-110" value="{if $pathID !== ''}{$offerDetails[$pathID][$i]["LandingPageID"]|default:$defaultID}{else}{$offerDetails[$i]["LandingPageID"]|default:$defaultID}{/if}"/>
			</div>
		</div>

		<div class="col-lg-2 col-3 max-w-lg-140">
			<div class="form-group">
				<input name="txtShareOffer{$suffix}{$i}" id="txtShareOffer{$suffix}{$i}" type="text" class="form-control max-w-lg-110" value="{if $pathID !== ''}{$offerDetails[$pathID][$i]["Share"]|default:0}{else}{$offerDetails[$i]["Share"]|default:0}{/if}" onblur="validateInt(this, 0, 100)"/>
			</div>
		</div>

		<div class="col-lg-2 col-md-3 col-sm-4 col-2">
			<div class="form-group">
                <div>
                    <label class="custom-switch">
                        <input type="checkbox" class="custom-switch-input" name="chkInactiveOffer{$suffix}{$i}" id="chkInactiveOffer{$suffix}{$i}" onclick="clickInactiveOffer(this.checked, '{$suffix}{$i}')" {if $offerDetails[$pathID][$i]["Active"]|default:1 && $offerDetails[$i]["Active"]|default:1}checked="checked"{/if}/>
                        <span class="custom-switch-indicator" data-toggle="tooltip" data-placement="right" title="" data-original-title="Active Status"></span>
                        <span class="custom-switch-description"></span>
                    </label>
                </div>
            </div>
        </div>
		
		<div class="col-lg-1 col-md-1 col-sm-4 mb-3 mb-lg-0 col-2 text-center">
            <button class="btn btn-sm btn-primary badge" type="button" data-toggle="tooltip" data-placement="right" title="" data-original-title="Delete" onclick="clickDeleteOffer('Offer{$suffix}{$i}')"><i class="fa fa-trash"></i></button>
		</div>

		<div class="col-lg-1 col-md-2 col-sm-4 col-2">
			<span class="btn btn-outline-info generateCodeHandler w-100 max-w-lg-110 d-flex align-items-center justify-content-center" rel="modalpostbackurl" data-toggle="tooltip" data-placement="right" title="" data-original-title="Get Postback URL" data-item="Offer{$suffix}{$i}"><i class="fa fa-code"></i></span>
		</div>
        <input style="display:none" name="txtPageNameOffer{$suffix}{$i}" id="txtPageNameOffer{$suffix}{$i}" type="text" class="form-control" value="{if $pathID !== ''}{$offerDetails[$pathID][$i]["Offer"]|default:''}{else}{$offerDetails[$i]["Offer"]|default:''}{/if}" />
        <select style="display:none" name="ddlNetwork{$suffix}{$i}" id="ddlNetwork{$suffix}{$i}" class="form-control" onchange="updateSpecificPostbacks()">
            {if $pathID !== ''}
                {assign var=selectedNetwork value=$offerDetails[$pathID][$i]["AffiliateSourceID"]|default:1}
            {else}
                {assign var=selectedNetwork value=$offerDetails[$i]["AffiliateSourceID"]|default:1}
            {/if}
            {html_options options=$networksArray selected=$selectedNetwork}
        </select>
        <input style="display:none" name="txtPageUrlOffer{$suffix}{$i}" id="txtPageUrlOffer{$suffix}{$i}" placeholder="http://" type="text" class="form-control" value="{if $pathID !== ''}{$offerDetails[$pathID][$i]["Url"]|default:''}{else}{$offerDetails[$i]["Url"]|default:''}{/if}" autocomplete="off"/>
        <input style="display:none" name="txtPayout{$suffix}{$i}" id="txtPayout{$suffix}{$i}" type="text" class="form-control" value="{if $pathID !== ''}{$offerDetails[$pathID][$i]["Payout"]|default:0}{else}{$offerDetails[$i]["Payout"]|default:0}{/if}" onblur="validateFloat(this, 0)" />
	</div>

</div>
