<div class="am-form-group region-linkage {{if isset($module_params['is_row']) and $module_params['is_row'] eq 1}}row{{/if}}" data-url="{{:MyUrl('admin/region/node')}}" data-code-url="{{:MyUrl('admin/region/codedata')}}" data-original-value="{{if !empty($region_linkage_data)}}{{:urlencode(base64_encode(json_encode($region_linkage_data)))}}{{/if}}">
    <label class="am-block">
        <span>
            {{if empty($module_params['title'])}}{{:MyLang('form_region_title')}}{{else /}}{{$module_params.title}}{{/if}}
            {{if !isset($module_params['required']) or $module_params['required'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}
        </span>
    </label>
    <div class="am-flex am-gap-1">
        <div class="am-cascader {{if empty($region_linkage_data)}}max-width{{/if}}">
            <div class="am-cascader-suffix">
                <div class="am-input-inner input-model"></div>
                <input type="text" readonly="readonly" name="province_city_county" autocomplete="off" placeholder="{{if empty($module_params['title'])}}{{:MyLang('form_region_title')}}{{else /}}{{$module_params.title}}{{/if}}" data-validation-message="{{:MyLang('form_region_message')}}"
                value="{{if !empty($data['province_name'])}}{{$data.province_name}}{{/if}}{{if !empty($data['city_name'])}}-{{$data.city_name}}{{/if}}{{if !empty($data['county_name'])}}-{{$data.county_name}}{{/if}}"
                class="am-input-inner" {{if !isset($module_params['required']) or $module_params['required'] eq 1}}required{{/if}}>
                <input type="hidden" name="province" value="{{if isset($data['province'])}}{{$data.province}}{{else /}}0{{/if}}">
                <input type="hidden" name="city" value="{{if isset($data['city'])}}{{$data.city}}{{else /}}0{{/if}}">
                <input type="hidden" name="county" value="{{if isset($data['county'])}}{{$data.county}}{{else /}}0{{/if}}">
                <span class="am-input-suffix">
                    <i class="iconfont icon-angle-down"></i>
                </span>
            </div>
            <div class="am-cascader-dropdown">
                <div class="am-cascader-panel">
                    <div class="am-scrollbar province am-cascader-menu {{if isset($data['province'])}}am-active{{/if}}" data-key="province">
                        <div class="am-cascader-menu-wrap am-scrollbar-wrap am-scrollbar-wrap-hidden-default">
                            <ul class="am-scrollbar-view am-cascader-menu-list">
                            </ul>
                        </div>
                    </div>
                    <div class="am-scrollbar city am-cascader-menu {{if isset($data['city'])}}am-active{{/if}}" data-key="city">
                        <div class="am-cascader-menu-wrap am-scrollbar-wrap am-scrollbar-wrap-hidden-default">
                            <ul class="am-scrollbar-view am-cascader-menu-list">
                            </ul>
                        </div>
                    </div>
                    <div class="am-scrollbar county am-cascader-menu {{if isset($data['county'])}}am-active{{else /}}0{{/if}}" data-key="county">
                        <div class="am-cascader-menu-wrap am-scrollbar-wrap am-scrollbar-wrap-hidden-default">
                            <ul class="am-scrollbar-view am-cascader-menu-list">
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="am-popper-arrow"></div>
            </div>
        </div>
        {{if empty($region_linkage_data)}}
            <div class="am-input-group am-input-group-sm region-linkage-code">
                <input type="text" class="am-form-field am-radius" placeholder="{{:MyLang('form_region_code_placeholder')}}" value="{{if !empty($data['address_last_code'])}}{{$data.address_last_code}}{{/if}}" />
                <span class="am-input-group-btn">
                    <button type="button" class="am-btn am-btn-xs am-radius">{{:MyLang('form_region_code_button_name')}}</button>
                </span>
            </div>
        {{/if}}
    </div>
</div>