<!-- Conversations list -->
<div class="thread-list-wrapper">

	<?php wpj_display_search_conversation_form(); ?>

	<div class="thread-list-viewport">

		<div class="thread-list-content">

			<!-- List messages by user -->
			<div id="user_messages">

				<div id="no_messages" class="ui segment" <?php if ( $conversations_data->have_rows() || wpj_get_pm_interlocutor_from_url() ) { echo 'style="display:none;"'; } ?>>

					<?php _e( 'No user found.', 'wpjobster' ); ?>

				</div>

				<?php if ( $conversations_data->have_rows() ) {

					$conversations_data->show_list_fnc();

				} elseif ( ! $conversations_data->have_rows() && wpj_get_pm_interlocutor_from_url() ) { // create fake conversation until first message is sent

					$row = (object) array(
						'other'        => wpj_get_pm_interlocutor_from_url( 'id' ),
						'author'       => get_current_user_id(),
						'content'      => '',
						'custom_offer' => '',
						'id'           => 0,
						'datemade'     => time()
					);

					wpj_display_user_conversation_item( $row, $type );

				} ?>

			</div>

		</div>

	</div>

	<?php if ( $type == 'archived' )
		echo '<style>.archive-icon{background-color:#426195 !important;} .archive-icon .kb-svg-icon-wrap, .archive-icon .kt-btn-svg-icon {color:#ffffff !important;}</style>'; // for page builder

	else
		echo '<style>.inbox-icon{background-color:#426195 !important;} .inbox-icon .kb-svg-icon-wrap, .inbox-icon .kt-btn-svg-icon {color:#ffffff !important;}</style>'; // for page builder

	if ( wpj_get_pm_interlocutor_from_url( 'id' ) ) echo '<style>.pm-content-archive-row-wrapper{display:none;}</style>'; // for page builder
	else echo '<style>.pm-content-single-row-wrapper{display:none;}</style>'; // for page builder ?>

</div>