package com.develop.step.details

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import com.develop.step.databinding.FragmentDetailCookDescBinding

class CookDetailDescFragment: Fragment() {

    private lateinit var binding: FragmentDetailCookDescBinding
    private val viewModel by activityViewModels<CookDetailViewModel>()

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        binding = FragmentDetailCookDescBinding.inflate(
            inflater, container, false
        )
        viewModel.getRecipeLiveData().observe(viewLifecycleOwner) {
            binding.tvStepDetail.text = it.recipe.introduction
        }
        return binding.root
    }

}