@extends('backend.layouts.master')

@push('framework-styles')
	  {{-- Choose between 1. jquery from npm or 2. stocked jquery from jquery-ui --}}
    {{-- 1. Jquery, lodash, axios, bootstrap, fontawesome --}}
    {{-- style(mix('css/backend.css')) --}}
    {{-- 2. Jquery and Jquery UI --}}
    {{ style(mix('css/jquery-ui.css', 'vendor/rvsitebuilder/core')) }}

    {{ style(mix('css/uikit.css', 'vendor/rvsitebuilder/core')) }}
    {{-- style(mix('css/backend.css', 'vendor/rvsitebuilder/core')) --}}
  	<!-- only wysiwyg include backend-wysiwyg.css -->
  	{{ style(mix('css/backend-wysiwyg.css', 'vendor/rvsitebuilder/core')) }}
@endpush

@push('package-styles')
  {{-- TODO:: สองไฟล์นี้จะรวมอยู่ใน artisan rvsitebuilder:wysiwyg --}}


	{{ style(@mixcdn('rvwysiwyg.css', 'vendor/rvsitebuilder/wysiwyg')) }}


	<style type="text/css">
	.outPopUp {
		position: absolute;
		width: 80px;
		height: 80px;
		z-index: 15;
		top: 40%;
		left: 50%;
		margin: -40px 0 0 -40px;

	}
	#topbar {
		height: auto;
		top:;
		position: relative;
	}
	</style>
@endpush

@push('framework-scripts')
  	{{-- Choose between 1. jquery from npm or 2. stocked jquery from jquery-ui --}}
    {{-- 1. Jquery, lodash, axios, bootstrap --}}
    {{-- script(mix('js/manifest.js')) --}}
    {{-- script(mix('js/vendor.js')) --}}
    {{-- script(mix('js/backend.js')) --}}
    {{-- 2. Jquery and Jquery UI --}}
    {{ script(mix('js/jquery-ui.js', 'vendor/rvsitebuilder/core')) }}

    {{-- jquery independent --}}
    {{ script(mix('js/uikit.js', 'vendor/rvsitebuilder/core')) }}
@endpush

@push('package-scripts')
	<!-- storage/json -->
	{!! script('storage/json/freeImages.json') !!}
	{!! script('storage/json/storeimages.json') !!}
	{!! script('storage/json/myimages.json') !!}
	{!! script('storage/json/tagfolder.json') !!}
	{!! script('storage/json/parallax.json') !!}
	{!! script('storage/json/freeBackground.json') !!}

	<script type="text/javascript">

  var viewmode = "{{ $viewmode }}";
  var editmode = "{{ $editmode }}";

  // 1 ตัว เปลี่ยนไปใช้ wex.globalSetting
  var globalSetting = '{!! addslashes($globalSetting)  !!}';

  // 2 ตัว เปลี่ยนไปใช้ wex.page
  var jsonPageStructure = {};
	
	// 4 ตัว เปลี่ยนไปใช้ wex.current
	var currentPageJSON = '{!! addslashes(json_encode($currentPageData))  !!}';

	var lastpagemodifier = '{{$lastpagemodifier}}';
	var slugname = '{!! $currentPageData->slug->slug_name !!}';
    var slugprefix = '{!! $currentPageData->slug->slug_prefix !!}';
	var user_sidebar = JSON.parse(currentPageJSON).sidebar.use_sidebar ;
	var isCustom_sidebar =  JSON.parse(currentPageJSON).sidebar.isCustom_sidebar;

	</script>

	<!-- mix -->
	{{ script(@mixcdn('js/backend/master_wysiwyg.js', 'vendor/rvsitebuilder/wysiwyg')) }}

	<!-- wyswiyg -->
	{{ script(@mixcdn('rvwysiwyg-plugin.js', 'vendor/rvsitebuilder/wysiwyg')) }}
	{{ script(@mixcdn('rvwysiwyg.js', 'vendor/rvsitebuilder/wysiwyg')) }}
	<!--  include site property js -->
	{{ script(@mixcdn('js/backend/siteproperty.js', 'vendor/rvsitebuilder/wysiwyg')) }}

@endpush
