return function(C,Z)C=C or Enum.TextXAlignment.Center if Z.type=="\115\101\116\088\065\108\105\103\110\109\101\110\116"then return Z.alignment or Enum.TextXAlignment.Center elseif Z.type=="\115\101\116\084\101\120\116\073\116\101\109"then return Z.item and Z.item.TextXAlignment or Enum.TextXAlignment.Center end return C end
return function (state, action)
  state = state or Enum.TextXAlignment.Center

  if action.type == "setXAlignment" then
    return action.alignment or Enum.TextXAlignment.Center
  elseif action.type == "setTextItem" then
    -- Update when a new TextItem is set
    return action.item and action.item.TextXAlignment or Enum.TextXAlignment.Center
  end

  return state
end