import React  ,{useState}  from 'react';
 import C from 'rn-class'
 import { isValidElementType  } from "react-is";
 import { Slider } from 'react-native-elements';

export default (props)=>{ 
    // console.log(props);
    
    let [ curPlayIdx, setCurPlayIdx ] =  useState(0);
    let [ bFull, setbFull ] =  useState(false);
    // po-fulla 
    let onFull = () =>{
        setbFull(!bFull);
    }
    
    return (
        <C.View cls={`bgc-color-white ai-c zidx2 ${bFull ? "po-fulla" : "flx0.1" }`}> 
            <C.View cls="w90% flx1 bgc-color-listbg br10 flx-row jc-sa ai-c mt0.4 pt0.4">       

                <C.TouchableOpacity cls="flx0.2 h90%" onPress={onFull}>
                    <C.Image source={props.Pages.img} 
                        resizeMode="contain"
                        cls={"w100% h100%"}
                         />
                </C.TouchableOpacity> 

                <C.View cls="flx0.5">
                    <C.Text>제목</C.Text> 
                     <C.EL.Slider 
                                value={curPlayIdx}
                                onValueChange={value => setCurPlayIdx( value )} 
                        />   
                        
                </C.View> 
                <C.View cls="flx0.2 jc-c ai-sa flx-row">
                    <C.EL.Icon type="entypo" name="controller-play"  /> 
                    <C.EL.Icon type="entypo" name="cross"  onPress={props.closePlayer}/>  
                </C.View>

            </C.View>  
        </C.View>
    )  


}

