from flexidata.reader.handlers import FileHandler
from typing import Optional
from flexidata.utils.constants import FileReaderSource

class XlsxParser(FileHandler):

    def __init__(
        self,
        file_path: Optional[str] = None,
        file_url: Optional[str] = None,
        source: FileReaderSource = FileReaderSource.LOCAL,
        extract_table: bool = False,
        extract_image: bool = False,
        bucket_name: Optional[str] = None,
        file_key: Optional[str] = None,
        **kwargs,
    ) -> None:
        super().__init__(source, file_path, file_url, bucket_name, file_key)
        self.extract_table = extract_table
        self.extract_image = extract_image
        self.text_extractable = False
        self.document = None
        self.page_number = 1
        self.text_blocks = []

