package com.hepl.tunefortwo.service.impl;

import java.nio.file.Path;
import java.nio.file.Paths;

import org.springframework.stereotype.Component;

import com.hepl.tunefortwo.config.properties.StorageProperties;
import com.hepl.tunefortwo.service.FilePathService;

@Component
public class ProfileFileServiceImpl implements FilePathService {

    private final Path profileLocation;

    public ProfileFileServiceImpl(StorageProperties properties) {
        this.profileLocation = Paths.get(properties.getLocation()).resolve(properties.getProfile());
    }

    @Override
    public Path getDestinationPath() {
        return this.profileLocation;
    }

}
