local o=require(script.Parent.Parent.Configuration)local A=require(script.Parent.Parent.Utility.ThemeAccessor)local Q=o.RoactAnimate local l=o.Roact local F=l.PureComponent:extend("\084\101\120\116\070\105\101\108\100")F.defaultProps={AnchorPoint=Vector2.new();ClearTextOnFocus=false,LayoutOrder=0;Size=UDim2.fromScale(1,.15);TextEditable=true;ZIndex=1,Font=Enum.Font.SourceSansBold,Active=false;Erroring=false,Label="\085\114\108"}function F.init(F,o)F:setState({UnderbarSize=Q.Value.new(o.Active and UDim2.new(1,0,0,2)or UDim2.fromOffset(0,2)),UnderbarBackgroundColor3=Q.Value.new(A.Get(F,o.Erroring and"\084\101\120\116\070\105\101\108\100\069\114\114\111\114\067\111\108\111\114"or"\084\101\120\116\070\105\101\108\100\068\101\102\097\117\108\116\067\111\108\111\114"));BoxTextSize=Q.Value.new(o.Active and UDim2.fromScale(1,.5)or UDim2.fromScale(1,1));BoxTextPosition=Q.Value.new(o.Active and UDim2.fromScale(0,-0.3)or UDim2.new()),BoxTextTextTransparency=Q.Value.new(o.Active and 0 or.4),BoxTextTextColor3=Q.Value.new(o.Active and 0 or.4),PseudoTextTextColor3=Q.Value.new()})F.TextRef=l.createRef()end function F.willUpdate(A,o)local Q={}local l=0 if A.props.Active~=o.Active then end end function F.render(o)local A=o.props.ZIndex return l.createElement("\084\101\120\116\066\111\120",{AnchorPoint=o.props.AnchorPoint,BackgroundTransparency=1,ClearTextOnFocus=o.props.ClearTextOnFocus;LayoutOrder=o.props.LayoutOrder,Size=o.props.Size,TextEditable=o.props.TextEditable;TextTransparency=1;ZIndex=A},{PseudoText=l.createElement(Q.TextLabel,{TextTransparency=.129;[l.Event.Focused]=function() end,[l.Event.FocusLost]=function() end},table.create(1,l.createElement("\085\073\080\097\100\100\105\110\103",{PaddingBottom=UDim.new(.11,0),PaddingLeft=UDim.new(.05,0);PaddingTop=UDim.new(.11,0)}))),Underbar=l.createElement(Q.Frame,{AnchorPoint=Vector2.new(.5,1),BackgroundColor3=o.state.UnderbarBackgroundColor3,BorderSizePixel=0,Position=UDim2.fromScale(.5,1),Size=o.state.UnderbarSize,ZIndex=A-1}),BoxText=l.createElement(Q.TextLabel,{Size=o.state.BoxTextSize,Position=o.state.BoxTextPosition,TextColor3=o.state.BoxTextTextColor3;TextTransparency=o.state.BoxTextTextTransparency;Text=o.props.Label},table.create(1,l.createElement("\085\073\080\097\100\100\105\110\103",{PaddingBottom=UDim.new(.11,0);PaddingLeft=UDim.new(.05,0);PaddingTop=UDim.new(.11,0)})))})end
local Configuration = require(script.Parent.Parent.Configuration)
local ThemeAccessor = require(script.Parent.Parent.Utility.ThemeAccessor)

local RoactAnimate = Configuration.RoactAnimate
local Roact = Configuration.Roact

local TextField = Roact.PureComponent:extend("TextField")
TextField.defaultProps = {
	AnchorPoint = Vector2.new(),
	ClearTextOnFocus = false,
	LayoutOrder = 0,
	Size = UDim2.fromScale(1, 0.15),
	TextEditable = true,
	ZIndex = 1,
	Font = Enum.Font.SourceSansBold,

	Active = false,
	Erroring = false,
	Label = "Url",
}

function TextField:init(props)
	self:setState({
		UnderbarSize = RoactAnimate.Value.new(props.Active and UDim2.new(1, 0, 0, 2) or UDim2.fromOffset(0, 2)),
		UnderbarBackgroundColor3 = RoactAnimate.Value.new(ThemeAccessor.Get(self, props.Erroring and "TextFieldErrorColor" or "TextFieldDefaultColor")),

		BoxTextSize = RoactAnimate.Value.new(props.Active and UDim2.fromScale(1, 0.5) or UDim2.fromScale(1, 1)),
		BoxTextPosition = RoactAnimate.Value.new(props.Active and UDim2.fromScale(0, -0.3) or UDim2.new()),
		BoxTextTextTransparency = RoactAnimate.Value.new(props.Active and 0 or 0.4),
		BoxTextTextColor3 = RoactAnimate.Value.new(props.Active and 0 or 0.4),

		PseudoTextTextColor3 = RoactAnimate.Value.new(),
	})

	self.TextRef = Roact.createRef()
end

function TextField:willUpdate(NextProps)
	local Animations = {}
	local Length = 0

	if self.props.Active ~= NextProps.Active then
		
	end
end

function TextField:render()
	local ZIndex = self.props.ZIndex

	return Roact.createElement("TextBox", {
		AnchorPoint = self.props.AnchorPoint,
		BackgroundTransparency = 1,
		ClearTextOnFocus = self.props.ClearTextOnFocus,
		LayoutOrder = self.props.LayoutOrder,
		Size = self.props.Size,
		TextEditable = self.props.TextEditable,
		TextTransparency = 1,
		ZIndex = ZIndex,
	}, {
		PseudoText = Roact.createElement(RoactAnimate.TextLabel, {
			TextTransparency = 0.129,

			[Roact.Event.Focused] = function()
				
			end,

			[Roact.Event.FocusLost] = function()
				
			end,
		}, table.create(1, Roact.createElement("UIPadding", {
			PaddingBottom = UDim.new(0.11, 0),
			PaddingLeft = UDim.new(0.05, 0),
			PaddingTop = UDim.new(0.11, 0),
		}))),

		Underbar = Roact.createElement(RoactAnimate.Frame, {
			AnchorPoint = Vector2.new(0.5, 1),
			BackgroundColor3 = self.state.UnderbarBackgroundColor3,
			BorderSizePixel = 0,
			Position = UDim2.fromScale(0.5, 1),
			Size = self.state.UnderbarSize,
			ZIndex = ZIndex - 1,
		}),

		BoxText = Roact.createElement(RoactAnimate.TextLabel, {
			Size = self.state.BoxTextSize,
			Position = self.state.BoxTextPosition,
			TextColor3 = self.state.BoxTextTextColor3,
			TextTransparency = self.state.BoxTextTextTransparency,
			Text = self.props.Label,
		}, table.create(1, Roact.createElement("UIPadding", {
			PaddingBottom = UDim.new(0.11, 0),
			PaddingLeft = UDim.new(0.05, 0),
			PaddingTop = UDim.new(0.11, 0),
		}))),
	})
end