from helium.bfs10077.bfs10140 import lower, bfs10144
class bfs10152(object):
  def bfs10140(self, value, text):
    raise NotImplementedError()

  def text(self, value, text):
    raise NotImplementedError()


class bfs10151(bfs10152):
  def bfs10140(self, value, text):
    if (not text):
      return ''

    if ('*' in text):
      bfs10153 = value
    else:
      bfs10153 = ("translate(%s, '*', '')" % value)

    return ("starts-with(normalize-space(%s), '%s')" % (lower(bfs10144(bfs10153)), text.lower()))

  def text(self, value, text):
    if (not text):
      return True

    return value.lower().lstrip().startswith(text.lower())


