import { Override , useAnimation } from "framer" ; import { useSwitch } from "./" ; export function UnlockSlider ( ) { const controls = useAnimation ( ) ; const dragThreshold = 200 ; return { animate : controls , drag : "x" , dragElastic : false , dragMomentum : false , dragConstraints : { left : 0 , right : 200 } , onDragEnd : ( e , { point } ) => { if ( point . x < dragThreshold ) { controls . start ( { x : 0 } ) ; } } , shouldTrigger : ( e , { point } ) => point . x >= dragThreshold , } ; } export function ScaleDown ( ) { return { whileTap : { scale : 0.8 } , } ; } export function ExternalSwitchControl ( ) { const controls = useSwitch ( ) ; return { onTap : ( ) => { controls . setSwitchState ( "sharedFancyTabNav" , "Middle Focused" ) ; } , } ; }