package com.common.im.ui.activity;

import android.os.Bundle;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.common.im.ui.contact.ContactListTabFragment;
import com.common.im_ui.databinding.ActivitySelectContactLayoutBinding;
import com.cooleshow.base.router.RouterPath;
import com.cooleshow.base.ui.activity.BaseActivity;
import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;

import androidx.annotation.Nullable;

/**
 * Author by pq, Date on 2022/7/13.
 */
@Route(path = RouterPath.ChatCenter.CHAT_SELECT_CONTACT)
public class SelectContactActivity extends BaseActivity<ActivitySelectContactLayoutBinding> {


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        QMUIStatusBarHelper.setStatusBarLightMode(this);
    }

    @Override
    protected void initView() {
        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "选择联系人");
        ContactListTabFragment contactListTabFragment = new ContactListTabFragment();
        Bundle bundle = new Bundle();
        bundle.putBoolean(ContactListTabFragment.IS_SELECT_CONTACT, true);
        contactListTabFragment.setArguments(bundle);
        getSupportFragmentManager().beginTransaction().replace(com.cooleshow.base.R.id.fl_my_container, contactListTabFragment).commitAllowingStateLoss();
    }

    @Override
    protected ActivitySelectContactLayoutBinding getLayoutView() {
        return ActivitySelectContactLayoutBinding.inflate(getLayoutInflater());
    }
}
